Skip to content

Commit

Permalink
Fix: shaack#114 Lighthouse warning 'Does not use passive listeners to…
Browse files Browse the repository at this point in the history
… improve scrolling performance'.
  • Loading branch information
elisabeth202 committed Dec 5, 2022
1 parent 5e60013 commit b10b1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap-input-spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
})
element.addEventListener("touchend", function (e) {
callback(e)
})
}, {passive: true})
element.addEventListener("keyup", function (e) {
if ((e.keyCode === 32 || e.keyCode === 13)) {
triggerKeyPressed = false
Expand All @@ -349,7 +349,7 @@
e.preventDefault()
}
callback(e)
})
}, {passive: true})
element.addEventListener("keydown", function (e) {
if ((e.keyCode === 32 || e.keyCode === 13) && !triggerKeyPressed) {
triggerKeyPressed = true
Expand Down

0 comments on commit b10b1b2

Please sign in to comment.