Clicking on a dialog backdrop selects everything inside the dialog
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: hi, Assigned: emilio)
References
Details
Attachments
(2 files)
Steps to reproduce:
Create a <dialog> and use the .showModal() method to open it. When it is open, click anywhere on the backdrop (anywhere outside the dialog itself).
Actual results:
When you click on the backdrop, it causes everything inside the dialog to be selected.
Example here: https://codepen.io/kevinpowell/pen/ZEvKgyN
Expected results:
Clicking outside the dialog itself should result in nothing happening.
You can force this by declaring ::backdrop { pointer-events: none } in CSS, but that shouldn't be required.
Comment 1•3 years ago
|
||
I can reproduce the issue in Nightly100.0a1 Wundows10.
And I can also reproduce the issue in 91.7esr when set dom.dialog_element.enabled to true.
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
Our selection code doesn't deal too well with pseudo frames in the top
layer. This prevents the bad interaction.
| Assignee | ||
Comment 3•3 years ago
|
||
Instead of enforcing it in C++ use a UA rule instead, so that authors
can override it if needed.
Depends on D142582
Comment 7•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ad790a1f6c5f
https://hg.mozilla.org/mozilla-central/rev/bb6c65e9df92
Updated•3 years ago
|
Comment 8•3 years ago
|
||
I was able to reproduce the issue without the fix on Ubuntu 20.4 using build 100.0a1(20220330214842)
Verified as fixed on Ubuntu20.4/ Mac 10.13/ Win10 using build 100.0b5(20220412185818).
Updated•3 years ago
|
Description
•