Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric field incrementing 2x step value #1543

Closed
thomaswormald opened this issue May 12, 2021 · 3 comments
Closed

Numeric field incrementing 2x step value #1543

thomaswormald opened this issue May 12, 2021 · 3 comments
Labels
bug Something does not work as intended/expected
Milestone

Comments

@thomaswormald
Copy link

Describe the bug
The NumericField's value increments at 2x the step value when using the up arrow on the keyboard. Same applies for decrementing with the down arrow. Browser: Chrome 90

Expected behavior
The value should increment/decrement the step value, same as when the increment/decrement buttons on the control are clicked.

TryMudBlazor
https://try.mudblazor.com/snippet/wawFkzlwyZaEltRc

Screenshots
numericfield

@thomaswormald thomaswormald added the bug Something does not work as intended/expected label May 12, 2021
@henon
Copy link
Collaborator

henon commented May 13, 2021

@IIARROWS could you check this please?

@IIARROWS
Copy link
Sponsor Contributor

Looks like the stop propagation hasn't been released correctly... it gets increased both by the code and the browser. I'm preparing a PR that restored the intended behaviour.

henon added a commit that referenced this issue May 15, 2021
…, fixes #1543)

* NumericField: restore preventDefault to true on up/down arrows

* InterceptArrowKey invokes OnKeyDown instead of OnKeyPress

* Added RuntimeLocation utility

* Fix keyDown always prevented

* NumericField: accurate increment/decrement on serverside with arrow keys

Co-authored-by: Meinrad Recheis <meinrad.recheis@gmail.com>
@henon henon added this to the 5.0.9 milestone May 15, 2021
@henon
Copy link
Collaborator

henon commented May 15, 2021

Fixed

@henon henon closed this as completed May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

3 participants