Viewing 1 replies (of 1 total)
  • Thread Starter naresh11381

    (@naresh11381)

    This code works. You may want to integrate something into the plugin directly.

    document.addEventListener('DOMContentLoaded', function () {
        document.addEventListener('focus', function (event) {
            if (event.target.matches('input[type=number]')) {
                event.target.addEventListener('wheel', preventScroll, { passive: false });
            }
        }, true);
    
        document.addEventListener('blur', function (event) {
            if (event.target.matches('input[type=number]')) {
                event.target.removeEventListener('wheel', preventScroll);
            }
        }, true);
    
        function preventScroll(event) {
            event.preventDefault();
        }
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Scrolling in input fields issue’ is closed to new replies.