Last active
August 23, 2021 00:08
-
-
Save philecker/3ed5c3a5effaf0ace083d90d90a6d021 to your computer and use it in GitHub Desktop.
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
document.addEventListener('wheel', () => { | |
if(document.activeElement.type === 'number'){ | |
document.activeElement.blur(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple event listener to prevent mouse wheel from incrementing number input.