From bcbd8fdd3e4d51d55a0ceb1f673b837c6d7e696a Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Sun, 24 Nov 2024 02:30:17 +0200 Subject: [PATCH] fix menus --- src/livecodes/core.ts | 2 +- src/livecodes/styles/inc-menu.scss | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/livecodes/core.ts b/src/livecodes/core.ts index 33f8d8809..3fad97274 100644 --- a/src/livecodes/core.ts +++ b/src/livecodes/core.ts @@ -2700,7 +2700,7 @@ const adjustFontSize = (container: HTMLElement) => { }; const handleAppMenuButtonFocus = () => { - // workaround for safari where click does not trigger focus! + // workaround for safari where click does not maintain focus! document.querySelectorAll('.app-menu-button').forEach((button) => { eventsManager.addEventListener(button, 'click', () => { button.focus(); diff --git a/src/livecodes/styles/inc-menu.scss b/src/livecodes/styles/inc-menu.scss index 1ea25ac07..ef5d0d864 100644 --- a/src/livecodes/styles/inc-menu.scss +++ b/src/livecodes/styles/inc-menu.scss @@ -46,13 +46,7 @@ .app-menu-button { &:focus + .menu-scroller, - &:focus-within + .menu-scroller, - &:has(:focus) + .menu-scroller, - &:active + .menu-scroller, &:focus + .menu-scroller > .dropdown-menu, - &:focus-within + .menu-scroller > .dropdown-menu, - &:has(:focus) + .menu-scroller > .dropdown-menu, - &:active + .menu-scroller > .dropdown-menu, + .menu-scroller:hover, + .menu-scroller > .dropdown-menu:hover { animation: fadeIn 0.4s forwards;