Buttons don't receive mouse events from overflowing in-flow descendants
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: dholbert, Assigned: MatsPalmgren_bugz)
References
Details
Attachments
(3 files)
STR:
- Load attached testcase
- Click some of the text that's outside the button.
EXPECTED RESULTS:
Button should receive the click and an alert should appear.
ACTUAL RESULTS:
Button does not receive the click; nothing happens.
Chrome gives EXPECTED RESULTS.
Firefox Nightly 67.0a1 (2019-02-19) gives ACTUAL RESULTS.
(Note: if I make the overflowing content 'position:absolute', then I get EXPECTED RESULTS -- at least, I do as of bug 1089326 which fixed this case for abspos stuff.)
I think this may've been something that we overlooked in bug 1089326's fix (unless this was a case that we intentionally exempted for some reason?)
Reporter | ||
Comment 1•5 years ago
|
||
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
The same thing happens if I make a descendant overflow by relatively positioning it -- the button doesn't receive its click events.
(Though if I absolutely position it, then the button does receive click events. Attachment 8946239 [details] is a larger testcase that shows the difference between those two behaviors.)
Comment 3•5 years ago
|
||
Sounds like some hit testing issue then. It is using display list creation.
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Yeah, looks like that was introduced in bug 1111995. Mats, would making the button anon box inherit border-radius be a better solution instead of clipping?
Comment 6•5 years ago
|
||
Hmm, though maybe that's not all, bug 770106 also looks relevant.
Assignee | ||
Comment 7•5 years ago
|
||
This should do it I guess:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a37bcb38e4930d855d32709e30bc29c3f4d5218
Assignee | ||
Comment 8•5 years ago
|
||
Comment 9•5 years ago
|
||
Comment on attachment 9046278 [details] [diff] [review] fix+test Review of attachment 9046278 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense, thanks for fixing this :) ::: layout/forms/test/test_bug1529036.html @@ +28,5 @@ > + e.addEventListener('click', function(event) { > + ++clicks; > + }); > + } > + nit: Whitespace.
Comment 10•5 years ago
|
||
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f36ad4139437 Clip <button> to its border area for event hit testing, but not its children. r=emilio
Assignee | ||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
bugherder |
Description
•