🏠 back to Observable

Double input bug on chrome

Hi All.

I recently created this notebook

Everything was lovely until one day very recently my inputs with type=number started behaving strangely on chrome.

When I click into the input and use the up and down arrow on my keyboard the numbers increment by 1 as I would expect from the code I have written. However, when I use the little arrow buttons that appear on the screen when I click into the input then the value increments by double the amount.

I loaded the notebook in safari and I don’t have this issue so it appears to be a chrome thing.

Is this a bug or am I missing something obvious?

Thanks for your help.

Matt

I can’t reproduce this in Chrome, Firefox or Safari on my MacBook. I tried clicking on the up / down arrows on each of the 5 different number inputs.

Did you recently install any extensions to Chrome or other software that might interact with web forms?

I’m not able to reproduce this behavior. However, I will note that the input type=number behavior in Chrome can be a little “twitchy”: if you have the input focused, mousewheeling over the input will cause the value to go up or down. If you have a “magic” mouse or touchpad, it’s fairly easy to mousewheel simultaneously while clicking the tiny up or down buttons, which could explain the double increment behavior you’re seeing.

Thanks for taking the time to check this out.

It is so weird. I’m glad it works for you though - that’s the most important thing for me :slight_smile:

I did check re extensions and even if I turn them off it still happens - it also happens in incognito mode…and also on Brave…it does not however happen on my raspberry pi using chromium (that works fine). It is perhaps worth mentioning that I’m using MacOs Catalina.

Re the mousewheel thing - I am using an old school mouse :mouse:

'tis most strange :thinking:

Ah, it looks like this Chrome bug (found via SO). Apparently the fix is out in Chrome 78 which becomes stable in a few days.

2 Likes

Great - I’m not going crazy haha. Thanks so much for doing some digging.

Matt