import from UXP: Issue #2030 - Allow child nodes of button to participate in mouse hit tests (a585aeacf)

This commit is contained in:
2022-12-03 00:34:22 +08:00
parent 253c7902a6
commit cc57d007fb
4 changed files with 28 additions and 18 deletions
+2 -2
View File
@@ -117,8 +117,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()) {