mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Potentially fix info button reappearing
This commit is contained in:
parent
85b1b51b76
commit
3de66ebe23
1 changed files with 7 additions and 1 deletions
|
@ -189,14 +189,20 @@ export default class Utils {
|
|||
element.classList.add("animationDone");
|
||||
if (!rightSlide) element.classList.add("autoHideLeft");
|
||||
|
||||
let mouseEntered = false;
|
||||
|
||||
container.addEventListener("mouseenter", () => {
|
||||
mouseEntered = true;
|
||||
element.classList.remove("animationDone");
|
||||
|
||||
// Wait for next event loop
|
||||
setTimeout(() => element.classList.remove("hidden"), 10);
|
||||
setTimeout(() => {
|
||||
if (mouseEntered) element.classList.remove("hidden")
|
||||
}, 10);
|
||||
});
|
||||
|
||||
container.addEventListener("mouseleave", () => {
|
||||
mouseEntered = false;
|
||||
if (element.classList.contains("autoHiding")) {
|
||||
element.classList.add("hidden");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue