[macOS] Multiple popover panel-list elements can appear and overlap each other
Categories
(Toolkit :: UI Widgets, defect, P3)
Tracking
()
People
(Reporter: tgiles, Assigned: tgiles)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [recomp])
Attachments
(3 files)
We added popover support to our panel-list in Bug 2010864, and utilized the popover='manual' approach to simplify the toggling logic of the panel-list. While the panel-list popover behaves as expected on Windows and Linux, where there is only one popover panel-list visible at any time, this is not true for macOS.
STR:
- Use macOS or modify moz-select.mjs so that the arrow keys case always toggles the panel.
- Go to the Applications section in about:preferences
- Click on one of the select elements, it's popover panel-list should open.
- Click on a different select element, the first panel-list should close and the second should open
- Press the up or down arrow key
Expected: The first or last option in the second panel-list is selected.
Actual: The first or last option in the second panel-list is selected, and the first panel-list is re-opened
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Previously, the moz-select handler would always steal focus when its
panel closed through the handlePanelHidden() function. Now the focus
only returns to the panel trigger when there's no active element, the
active element is the body, or if the active element is the associated
moz-select. Without this change, it would be possible to click on two
different moz-select elements and then pressing the up or down arrow key
would close the second panel-list and reopen the first one. The expected
behavior is that arrow keys would start to select options in the open
panel-list, not close the open panel-list and open a different
panel-list.
Controlling via singleton no longer relevant due to "auto" behavior
WIP: Bug 2017668 - Ensure only one panel-list is visible via singleton
| Assignee | ||
Comment 2•2 months ago
|
||
This simplifies the state management and makes the popovers behave more
consistently. By utilizing the popovertarget on the HTML trigger
buttons in both moz-button and moz-select, we prevent the "clicking
causes the panel-list to open and then immediately close"" issue. Since
the panel trigger buttons had no popovertarget, the browser treated
every click as an "outside the popover" click and dimissed the popover.
This was the issue we were trying to work around by using the manual
behavior of popovers.
With these changes, the panel-list popovers behave more like the native
HTML select dropdown elements. There's still an improvement to be made
by allowing "mouseup" to select an element in the dropdown that appears,
but that is out of scope for this bug. For example, "mousedown" to open
the panel-list, continue holding the mouse down until you find the
option you want, then letting go of the mouse button to select the
hovered element.
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 3•2 months ago
|
||
Add comment about Mac panel trigger focus, restore handlePanelHidden
changes, move hideListeners initialization to prevent issues with
popover auto behavior.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 7•2 months ago
|
||
Since the dependent bug has been backed out on 149, I believe we no longer need to uplift this to beta 149.
Comment 9•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6967ea4477c9
https://hg.mozilla.org/mozilla-central/rev/742f78d25a91
https://hg.mozilla.org/mozilla-central/rev/02d5ce71d057
Updated•2 months ago
|
Comment 11•2 months ago
|
||
The popover support that was added to panel-list in bug 2010864 was backed out of Beta, so marking 149 disabled.
Updated•1 month ago
|
Description
•