diff --git a/frontend/src/styles/core.scss b/frontend/src/styles/core.scss index 80d6a2db1..f99d36f24 100644 --- a/frontend/src/styles/core.scss +++ b/frontend/src/styles/core.scss @@ -466,3 +466,15 @@ key { font-size: var(--balloon-font-size); line-height: var(--balloon-font-size); } + +// this here to prevent tooltips from showing when an element is focused via mouse click +// to avoid reappearing popups after clicks, WITHOUT breaking keyboard nav. +// so shortly we show balloon tooltips on hover and keyboard focus only. not on mouse focus! +@supports selector(:focus-visible) { + [aria-label][data-balloon-pos]:focus:not(:focus-visible):not(:hover)::before, + [aria-label][data-balloon-pos]:focus:not(:focus-visible):not(:hover)::after { + opacity: 0 !important; + visibility: hidden !important; + pointer-events: none !important; + } +} diff --git a/frontend/src/ts/pages/settings.ts b/frontend/src/ts/pages/settings.ts index d89eb19e8..3364f55dd 100644 --- a/frontend/src/ts/pages/settings.ts +++ b/frontend/src/ts/pages/settings.ts @@ -1008,7 +1008,6 @@ $(".pageSettings .section[data-config-name='funbox'] .buttons").on( const funbox = $(e.currentTarget).attr("data-config-value") as FunboxName; Funbox.toggleFunbox(funbox); setActiveFunboxButton(); - $(e.currentTarget).blur(); } );