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

AccessibleSlider: issue with keyboardStep and constrainValue #350

Closed
jessegreenberg opened this issue Apr 4, 2018 · 2 comments
Closed
Assignees

Comments

@jessegreenberg
Copy link
Contributor

@jbphet discovered that combinations of options of constrainValue and keyboardStep can result in a slider that is not usable with the keyboard. For example, if the keyboardStep is small enough such that constrainValue will round the value back to what it was before the change, arrow keys will do nothing.

@jbphet recommended throwing an assertion to warn of this case.

@jessegreenberg
Copy link
Contributor Author

I added the assertion, test-sims.html hit the assertion in the following sims/runnables:

  • hookes-law
  • masses-and-springs
  • pendulum-lab
  • projectile-motion
  • tambo (issue was first noted here)
  • wave-interference
  • wave-on-a-string

@zepumph
Copy link
Member

zepumph commented Mar 17, 2023

This is a really great thought! But over in #837 we are going nuclear and getting rid of constraintValue entirely. Closing

@zepumph zepumph closed this as completed Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants