Migrate NumericInput slider to pointer events#500
Open
willeastcott wants to merge 1 commit intomainfrom
Open
Conversation
- Replace mouse events with pointer events for consistency with Container - Add pointer ID tracking to prevent multi-touch interference - Works correctly even when pointer lock is unavailable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
The NumericInput slider control now uses pointer events instead of mouse events, aligning with the pattern established in the Container component. Pointer ID tracking ensures only the pointer that initiated the drag can control or end it, making the component robust for multi-touch scenarios and browsers where pointer lock may not be supported.
The existing Pointer Lock API usage is preserved for infinite scrubbing functionality. Event constant names (EVENT_SLIDER_MOUSEDOWN, EVENT_SLIDER_MOUSEUP) are kept for backward compatibility.
Test plan