-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workaround for chrome issue (#569)
* fix: workaround for chrome issue * chore: update coverage * chore: move class to other element * chore: improve remove class logic * chore: improve handle class logic * chore: rename class * chore: remove class from app-bar element * chore: add workaround for dots.svg button * chore: add workaround for dots.svg button
- Loading branch information
1 parent
45b5541
commit 5d73261
Showing
10 changed files
with
69 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const removeClass = (elementId, className, interval) => { | ||
const refreshId = setInterval(() => { | ||
const elem = document.getElementById(elementId); | ||
if (elem) { | ||
elem.classList.remove(className); | ||
clearInterval(refreshId); | ||
} | ||
}, interval); | ||
}; | ||
|
||
export default { | ||
addAndRemoveClass: (elementId, className, interval = 100) => { | ||
const refreshId = setInterval(() => { | ||
const elem = document.getElementById(elementId); | ||
if (elem) { | ||
elem.classList.add(className); | ||
clearInterval(refreshId); | ||
removeClass(elementId, className, interval); | ||
} | ||
}, interval); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters