I want to disable all scroll events on all inputs type number.
I saw some examples to do this but all the examples are only for one element
input = document.getElementById("the_number_input")
input.addEventListener("mousewheel", function(event){ this.blur() })
Or with Jquery
$('form').on('focus', 'input[type=number]', function (e) {
$(this).on('wheel.disableScroll', function (e) {
e.preventDefault()
})
})
$('form').on('blur', 'input[type=number]', function (e) {
$(this).off('wheel.disableScroll')
})
There is a solution with vanilla javascript?