TecKnow / STADiceRoller

Dice roller and probability visualizer compatible with the Star Trek Adventures TTRPG.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Input boxes are not useable on mobile #2

Closed TecKnow closed 1 year ago

TecKnow commented 1 year ago

There are currently numeric input boxes for the player character's attribute and discipline, as well as the number of dice in the pool and the complications range. On the desktop these values can be increased and decreased using the up and down arrow keys, or the up and down arrows that appear in the input fields on mouseover.

There are now arrow keys on mobile, which makes these boxes impossible to use properly. For example, it's not possible to enter an attribute value of 11 or 12, because the user would have to type "1" and then "2" but "1" is not in the allowed range, so the input is rejected.

I suspect that the smallest change that could fix this would be to enforce the range only on blur.

TecKnow commented 1 year ago

Resolved by #3 but the new control leaves leading 0's in place, so for example, the field will keep "03" as a value. This is still treated as the value 3 and doesn't damage functionality. I'm not yet sure if I consider it unsightly or not.