Fixes #5495 (Mobile navigation submenus need two clicks to open) #5496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
method
select
is overwritten to shiftthis.active
from the.all-categories
link to the clicked menu node. After opening a menu itemthis.active
is filled with the.all-categories
link and theselect
method does not expect that. It closes all menu items and skips the activation of the selected menu item.A
collapseAll
event is triggered for mobile devices if an open menu item is clicked so it closes it again.method
expand
is overwritten to skip expansion of the clicked menu node of the menu node was already open. This event would otherwise take place directly after the addedcollapseAll
.Although this is a working solution it does rewrite two major methods of the jQuery UI menu which I feel should not be necessary. So if someone would like to look into a different solution, be welcome.