-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix Slider web offset issue #806
Fix Slider web offset issue #806
Conversation
P-4133 Slider on the web view has offset problem
Summary : While sliding the thump on the webview, the position of the slider's thump is not matcing the mouse position, you can take a look at the loom video below |
Apply Sweep Rules to your PR?
|
Published version: @draftbit/[email protected] |
This reverts commit 9b7c7d2.
Published version: @draftbit/[email protected] |
Published version: @draftbit/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find!
onLayout
that relies on a ref. Initial call of theonLayout
uses an uninitialized ref (as is expected based on React behavior), which leads to an improperly initialized variable that indicates the x position of the slider. The workaround here is to force onLayout to be called again so that it gets initialized properly. See the comment in the code for more details.