Decimal input 0 step

I would like to disable the stepping on a decimal input so that when I press the arrow keys or scroll the input doesn’t change but when I set the step to 0 it seems to default back to 1

You can add an html attribute on the element to stop this behaviour

code for keydown

return !['ArrowUp','ArrowDown'].includes(event.key)

As for step behaviour it looks like step defaults to 1 and I don’t think 0 works at all this is from what I can tell an HTML thing and not weweb.

2 Likes

I also added this to stop the the scrolling from changing the value