[wp-trac] [WordPress Trac] #53587: Mobile: Admin menu: Click on content should hide the menu
WordPress Trac
noreply at wordpress.org
Sun Feb 12 01:03:26 UTC 2023
#53587: Mobile: Admin menu: Click on content should hide the menu
-------------------------------------+-------------------------------------
Reporter: kaneva | Owner: joedolson
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.2
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-testing-info needs- | Focuses: ui, accessibility,
testing has-patch | javascript, administration
-------------------------------------+-------------------------------------
Changes (by joedolson):
* keywords: needs-refresh has-testing-info => has-testing-info needs-
testing has-patch
Comment:
All right; using the information from @ryokuhi and managing to set up a
test case on iOS, I've got a fix for the issue.
The problem was that on iOS, the submenu trigger was causing a loss of
focus; by monitoring document.activeElement, I could see that the
activeElement shifted to the `body` when submenus were toggled. This
caused focusIsInToggle and focusIsInSidebar to return true.
Resolved this by triggering focus on the submenu trigger after toggling.
In addition, I added an escape on `! document.hasFocus()` so that the menu
wouldn't close if the user switches focus to another tab, window, or
application.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53587#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list