Custom Menus Stealing Focus.

Custom Menus Stealing Focus.

by Sam Thing -
Number of replies: 4

After an upgrade and change of theme I've noticed what, to me, looks like a bug or poor design choice.

When you click on a custom menu or custom user menu, it drops the menu down as you'd expect:

But if you then decide you didn't want that menu after all and click on another element (the search box in this example) the seach box momentarilly takes focus as you'd expect but then the focus is pulled back to the menu so that you have to click in the search box again. It looks like the event of collapsing the drop down pulls focus back to the menu

It works using the keyboard as well. Whilst cycling through menus with the Tab button, you can drop a menu down, change your mind and press Shift & Tab to jump back to the previous menu. Again, the previous menu gets focus briefly and it then gets pulled back to the menu you want to leave.

Tested this accross different themes, browsers, platforms and even here on moodle.org.

Am I missing something, is this the expected behaviour?


Cheers, Sam.

Average of ratings: -
In reply to Sam Thing

Re: Custom Menus Stealing Focus.

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Moodle version? Theme tested on?
In reply to Gareth J Barnard

Re: Custom Menus Stealing Focus.

by Sam Thing -
We're on 9.8+ but it I can replicate it here on Moodle.org so I imagine the version here should be pretty upto date.
Various themes tested including:
Moove and Adaptable and whatever theme Moodle.org runs.