Reputation: 126
Apologies for the title-gore. We discovered today that clicking near the perimeter of the "up" arrow on an HTML5 number input will trigger an event on the "up" arrow on the first click, but trigger events on the "down" arrow with every subsequent click.
Here's a one line fiddle that demonstrates the issue. I am able to reproduce the bug consistently in Chrome 59.
<input type="number" />
Move your cursor to the top edge of the number input's "up" arrow and click several times. It may take a few tries to get the cursor in the right place. The first click will trigger the up arrow, but every subsequent click will trigger the down arrow.
Is this caused by some type of click event fuzzing done by Chrome in an effort to assist with extremely minor misclicks? I'm pretty lost here.
Note: I attempted to reproduce in Edge and Firefox but was unsuccessful. This may just need to go to the Chrome team.
Upvotes: 2
Views: 1982
Reputation: 177685
This is a bug. You can report it at https://bugs.chromium.org if you like.
The gist is this: The code linked to below contains logic like
if (is_pressed) {
if (spin_up_pressed) {
highlight spin up
} else {
highlight spin down
}
}
Which is evidently not entirely correct.
https://cs.chromium.org/search/?q=spin_up%7CSpinUp+f:theme&type=cs
Upvotes: 3