Disable mouse scroll wheel on numeric questions

When entering numeric values, it is all too easy to scroll the number down accidentally when you meant to scroll down the page.
What is even worse about this issue is that it is very easy to miss this mistake if you scroll numeric question off the screen…

Some users may like the ability to use the scroll wheel to change numeric answers, but it would be good to have an option to disable the scroll wheel for numeric questions.

I am using Firefox 80

Hi @Sceptre,

Welcome to the community! Thank you for making this wonderful suggestion. Could you kindly backup with a screenshot of the issue so that it would be easy for us to validate the same at our end.

Have a great day!

Hi @Kal_Lam,

Sure thing, though I’m not sure how much extra value it provides.
The scroll wheel works while the cursor is within the bounds of the integer number entry box, so you enter a number, then scroll down to the next question and may not notice that the number has decreased by your scroll wheel turn amount.

Number is entered:
image

(continued in next post as I can’t post 2 images in the same message)

1 Like

After scrolling down
image

1 Like

Hi @Sceptre,

Could you let us know the question type you are using (i.e. the integer or the decimal)? Also could you let us know the browser you are using? Checking the same at my end.

Have a great day!

The browser is Firefox 80
It is an integer question, but decimal faces the same issue.

Decimal also faces an additional issue that when scrolling, it only increments/decrements by whole numbers.

1 Like

Hi @Sceptre,

Kindly please be informed that i could too reproduce this issue with firefox for both the integer as well as the decimal question types. However the issue is not seen with other modern browsers viz. chrome or Edge.

Hence, i would recommend you to use either chrome or edge to overcome this issue at the moment.

Thank you once again for bringing this issue to the entire KoBoToolbox community! Expecting the same in the upcoming days as well.

Have a great day!

1 Like

Hello @Kal_Lam

Recently, I´ve faced the same problem with Enketo, but I am using Edge and Chrome. Both of them have the same problem with the mouse scrolling wheel. Is there any other way to disable this feature in Enketo?

Thank you for your attention!

1 Like

@ricardonfc, could you kindly share with us a short video of the bug so that we could replicate it at our end.

A bug was recently filed against Enketo linking to this forum topic: Scrolling on a form updates integer values · Issue #1522 · enketo/enketo · GitHub.

I investigated and found this to be intended behavior of some browsers with HTML5 number input controls. I’ll paste my response here for convenience:

Hi @garethbowen, thanks for writing in. Isn’t this just the behavior of HTML5 <input type="number"> in certain browsers?

For example, if I go to http://htmledit.squarefree.com/ using Chrome 148 (Linux) and paste in <input type="number" value="123">, then I can change the value by scrolling (via two fingers on touchpad or mouse wheel), or by pressing the up or down arrow keys on the keyboard.

Crucially, and it appears this way in your Enketo demonstration video as well, the number input control must have the focus. Unfocused inputs are not altered by scrolling above them. In other words, you must click inside the input control and afterwards have the mouse pointer hovering over the control for scrolling to change the value.

On Firefox 150 (Linux), the scroll behavior with HTML5 number inputs doesn’t happen for me at all.

As this seems to be the intended behavior of Google Chrome (and presumably other browsers, but not Firefox), and it’s unchanged over many years, I will close this issue “as not planned” unless you or someone else from ODK would like to contribute a change to have this behavior be governed by an XLSForm appearance or similar.

I think the point I was making all those years ago was that although it may be the default behaviour of browsers, is it desirable behaviour for KoboToolbox?

I don’t think so - it leads to data input errors that are too easy to make and hard to spot.

Is it worth the dev time to fix? That’s not a question I can answer.

1 Like