JoryHogeveen / view-admin-as

View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.
https://wordpress.org/plugins/view-admin-as/
GNU General Public License v2.0
45 stars 4 forks source link

FireFox hides menu when hovering over select options #130

Closed JoryHogeveen closed 1 month ago

JoryHogeveen commented 9 months ago

Describe the bug

For some reason when using firefox it removes focus on the menu when hovering over the select dropdown which triggers WordPress core to hide the menu again.

Select options aren't really usual within the toolbar so I doubt WordPress core will fix this issue.

Reference: https://wordpress.org/support/topic/impossible-to-change-the-position-of-the-menu/

JoryHogeveen commented 9 months ago

Found the solution here: https://stackoverflow.com/a/811994/2539261 Apparently FireFox triggers the mouseleave event on the select element when moving to the select option. This triggers event bubbling and therefore triggers the WordPress toolbar script to hide the menu.