mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-29 10:05:53 +08:00
fix(tooltips): prevent hover pop-up reappearance on click (@byseif21) (#6831)
### Description tooltip pop-ups were reappearing on click when interacting with various clickable elements (e.g., tags in results table, test result buttons, account page actions).
This commit is contained in:
parent
68d2370d94
commit
42609e21dc
2 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue