• Resolved mwang00

    (@mwang00)


    Hi support,

    Is there a way we can change the user input box to textbox?

    Or can we add a .css or something so that scrollwheel can be disabled.

    This is to prevent user accidently changing the price by trying to scroll up and down the page.

Viewing 1 replies (of 1 total)
  • Henry N

    (@henrynguyen259)

    Try this:

    <script type="text/javascript"> 
        
        (function($) { 
            $(document).ready(function() { 
                // disable mousewheel on a input number field when in focus
                // (to prevent Chromium browsers change the value when scrolling)
                $('form.cart').on('focus', '.woonp input[type=number]', function (e) {
                    $(this).on('wheel.disableScroll', function (e) {
                        e.preventDefault();
                    });
                });
    
                $('form.cart').on('blur', '.woonp input[type=number]', function (e) {
                    $(this).off('wheel.disableScroll');
                });
            }); 
        })(jQuery);    
        </script>
Viewing 1 replies (of 1 total)
  • The topic ‘Disable Scrollwheel changing price’ is closed to new replies.