summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorMartok <martok@martoks-place.de>2022-11-27 16:35:38 +0100
committerMartok <martok@martoks-place.de>2022-11-27 16:35:38 +0100
commita585aeacf074187bdc0073aeaa08cdabb65fab38 (patch)
tree09322f8d4eb0a0c2271dc77d966d2ee9db394f12 /layout
parent814fa6e3baf41cd493f75a39f458ecd9a5c5508f (diff)
downloaduxp-a585aeacf074187bdc0073aeaa08cdabb65fab38.tar.gz
Issue #2030 - Allow child nodes of button to participate in mouse hit tests
This is needed for web compatibility, even if standards compliance is debatable.
Diffstat (limited to 'layout')
-rw-r--r--layout/forms/nsHTMLButtonControlFrame.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp
index 1ec0ec6c94..d1fbfbabd7 100644
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -118,8 +118,8 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayListCollection set(aBuilder);
- // Do not allow the child subtree to receive events.
- if (!isForEventDelivery) {
+ // HTMLInputElement buttons are opaque to hit tests, HTMLButtonElement buttons are not.
+ if (!(isForEventDelivery && this->IsInput())) {
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
if (ShouldClipPaintingToBorderBox()) {