ocadotechnology / hexagonjs

A modular, themable collection of components for modern browsers
https://www.hexagonjs.io
Apache License 2.0
51 stars 15 forks source link

NumberPicker: Press and hold increment breaks when hitting the min/max value #567

Open charlieTheBotDev opened 4 years ago

charlieTheBotDev commented 4 years ago

Context

If you set a min/max on a number picker and hold down the increment/decrement button until you hit the min/max value, the number picker gets stuck at the min/max.

number-picker

Seems to be the loop not exiting correctly that handles the increment/decrement when pressing and holding

Possible Fix

Correctly exit the loop when pressing and holding the button

Steps to Reproduce

  1. Go to https://hexagonjs.io/docs/number-picker/
  2. Press and hold 'up' on the third number picker example until it hits 10
  3. Attempt to decrease the number (or type something in)

Your Environment