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

NumericInput events run incorrectly when using min or max props #4200

Closed
ejose19 opened this issue Jun 30, 2020 · 1 comment · Fixed by #4201
Closed

NumericInput events run incorrectly when using min or max props #4200

ejose19 opened this issue Jun 30, 2020 · 1 comment · Fixed by #4201

Comments

@ejose19
Copy link
Contributor

ejose19 commented Jun 30, 2020

Environment

  • Package version(s): 3.28 / 3.29
  • Operating System: Linux
  • Browser name and version: Firefox 77 / Chromium 81

Code Sandbox

Link to a minimal repro (fork this code sandbox): https://codesandbox.io/s/blueprint-numericinput-vxkuu

Steps to reproduce

  1. Hold arrow button until limit is reached, then do the same with opposite button, repeating a couple of times will
    make all events to not work properly (button clicks set more than 1 step at once, and keyboard up and down arrow don't stop until limit is reached, even if tapped once)

Actual behavior

Button & keyboard events don't work properly

Expected behavior

Behaviour shouldn't not change when usin min/max

Edit: Seems I found the cause of the issue, this bug doesn't happen if you release the mouse before reaching the limit, or upon reaching the limit, outside of the disabled button. I've checked the source and it seems stopContinuousChange is not firing when releasing the mouse on the disabled button

@adidahiya
Copy link
Contributor

Yeah, I can confirm this bug.

I've checked the source and it seems stopContinuousChange is not firing when releasing the mouse on the disabled button

Sounds about right. Related to other bugs about disabled buttons not receiving events like #967.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants