You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to control an animation with the slider. So I have only one slider. I want the same things to happen when I press keys like right or left when the slider has focus as when it doesn't have focus. Currently I can control the animation with keys. The slider also has event handlers for the keys, and as I want to control the animation from the slider, it gets to be a double command that I don't know how to deal with. Anyone has some pointers for me?
Try with removing the event handlers for key events from the slider component. Instead, add a global event listener that listens for key events regardless of focus. In the event handler for the key events, check if the slider has focus. If it does, control the animation accordingly. This way, you can have consistent control over the animation whether the slider has focus or not.
Thanks for providing this component!
I want to control an animation with the slider. So I have only one slider. I want the same things to happen when I press keys like
right
orleft
when the slider has focus as when it doesn't have focus. Currently I can control the animation with keys. The slider also has event handlers for the keys, and as I want to control the animation from the slider, it gets to be a double command that I don't know how to deal with. Anyone has some pointers for me?Possibly related:
The text was updated successfully, but these errors were encountered: