Skip to content

Commit

Permalink
fix flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianc committed May 18, 2024
1 parent 0f34eb3 commit 2973e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function configureSelectFix() {
files.addEventListener('change', (e) => {
document.querySelectorAll('.file').forEach((el) => el.style.display = 'none')
window.scrollTo(0, 0)
setTimeout(() => document.getElementById(e.target.value).style.display = 'block', 1)
window.requestAnimationFrame(() => document.getElementById(e.target.value).style.display = 'block')
})

files.dispatchEvent(new Event('change'))
Expand Down

0 comments on commit 2973e21

Please sign in to comment.