Issue #3217175 by javi-er, mherchel: Olivero: Make IE11 close submenu when ESC key is pressed

merge-requests/862/head
Lauri Eskola 2021-06-29 10:34:56 +03:00
parent 630cd36d0f
commit 21c387a614
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@
// Closes any open sub navigation first, then close header navigation.
document.addEventListener('keyup', (e) => {
if (e.key === 'Escape') {
if (e.key === 'Escape' || e.key === 'Esc') {
if (props.olivero.areAnySubNavsOpen()) {
props.olivero.closeAllSubNav();
} else {

View File

@ -32,7 +32,7 @@
toggleNav(props, !isNavOpen(props.navWrapper));
});
document.addEventListener('keyup', function (e) {
if (e.key === 'Escape') {
if (e.key === 'Escape' || e.key === 'Esc') {
if (props.olivero.areAnySubNavsOpen()) {
props.olivero.closeAllSubNav();
} else {