Skip to content

Twenty Twenty (1.2) Horizontal menu - Submenu - #49950 #6150

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Closed
wants to merge 18 commits into from
PrevPrevious commit
Next Next commit
Test Run
  • Loading branch information
@Rcreators
Rcreators committedFeb 21, 2024
commit 679852bd350af4a058d7bb32e759742772538327
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwenty/assets/js/index.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -479,7 +479,7 @@ twentytwenty.primaryMenu = {
isEscape = (e.keyCode === 27);
}

// If pressed key is esc, remove focus class from main parent menu li and focus parent menu a link.
// If pressed key is esc, remove focus class from main parent menu li.
if (isEscape) {
if(menu.querySelector('li.menu-item-has-children').classList.contains('focus')){
menu.querySelector('li.focus.menu-item-has-children > a').focus();
Expand Down