This is a followup from #3192903: Mouseout event should not close navigation sub-menu if focus is inside the sub-menu comment #7

With that issue, submenus will not necessarily close on a mouseout event. However, they should close if there's a click event outside of the menus.

Comments

mherchel created an issue. See original summary.

sakthivel m’s picture

Status: Active » Needs review
StatusFileSize
new1.21 KB

#2 Please review the patch

sakthivel m’s picture

StatusFileSize
new1.24 KB
sakthivel m’s picture

StatusFileSize
new1.24 KB
sakthivel m’s picture

StatusFileSize
new1.25 KB

Custom Commands Failed #5 Recreated patch

gauravvvv’s picture

StatusFileSize
new3.97 MB
new2.16 MB

I have added before and after patch screen recordings. Patch #5, fixes the issue.

Now even after focusing on the menu if we click outside the menu. it is closing itself.

gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

The Olivero menu has quite a bit of Nightwatch test coverage. Could we add test coverage for this too?

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sakthivel m’s picture

Status: Needs work » Needs review
StatusFileSize
new1.25 KB

Just re-rolled the patch for 9.3.

chetanbharambe’s picture

Verified and tested patch #10.
Patch applied successfully and looks good to me.

Testing Steps:
# Goto: Header Menus
# Click on the dropdown toggle
# User should see Menu gets opened
# Click outside of the submenu
# User should not see menu remains open.

Expected Results:
# User should not see menu remains open once clicking outside of the submenu.

Actual Results:
# Currently User is able to see menu remains open once clicking outside of the submenu.

Note:
# Above issue is appearing on 9.2.x-dev version
# Not able to reproduce on 9.3.x-dev version

Can be a move to +1 RTBC.
Please check the attached videos for reference of both versions.

akhildev.cs’s picture

I tried this several times but I couldn't able to reproduce this issue on the 9.3.x-dev version. it seems there have no issues to apply,
#10

guilhermevp’s picture

StatusFileSize
new389.08 KB

I was unable to reproduce the error as well. Using Chrome 90.0.4430.93 it already works as intended.
Added video.

gauravvvv’s picture

Please refer to #7 to reproduce.

mherchel’s picture

Status: Needs review » Closed (outdated)

I tested this out, and this issue was actually fixed in #3191692: Have secondary menus close on blur