forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 143
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(textinput): Account for float dimensions when showing scroller #2341
Merged
Saadnajmi
merged 4 commits into
microsoft:main
from
lawrencewin:rn-ti-fractional-calc-fix
Jan 22, 2025
Merged
fix(textinput): Account for float dimensions when showing scroller #2341
Saadnajmi
merged 4 commits into
microsoft:main
from
lawrencewin:rn-ti-fractional-calc-fix
Jan 22, 2025
Conversation
This file contains 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
Saadnajmi
approved these changes
Jan 22, 2025
Saadnajmi
changed the title
Account for float dimensions when showing scroller
fix(textinput): Account for float dimensions when showing scroller
Jan 22, 2025
lawrencewin
added a commit
to lawrencewin/react-native-macos
that referenced
this pull request
Jan 22, 2025
…icrosoft#2341) * Account for float dimensions when showing scroller * Use fabs() --------- Co-authored-by: Saad Najmi <[email protected]>
lawrencewin
added a commit
to lawrencewin/react-native-macos
that referenced
this pull request
Jan 22, 2025
…icrosoft#2341) * Account for float dimensions when showing scroller * Use fabs() --------- Co-authored-by: Saad Najmi <[email protected]>
lawrencewin
added a commit
to lawrencewin/react-native-macos
that referenced
this pull request
Jan 22, 2025
…icrosoft#2341) * Account for float dimensions when showing scroller * Use fabs() --------- Co-authored-by: Saad Najmi <[email protected]>
This was referenced Jan 22, 2025
lawrencewin
added a commit
to lawrencewin/react-native-macos
that referenced
this pull request
Jan 22, 2025
…icrosoft#2341) * Account for float dimensions when showing scroller * Use fabs() --------- Co-authored-by: Saad Najmi <[email protected]>
lawrencewin
added a commit
to lawrencewin/react-native-macos
that referenced
this pull request
Jan 22, 2025
…icrosoft#2341) * Account for float dimensions when showing scroller * Use fabs() --------- Co-authored-by: Saad Najmi <[email protected]>
This was referenced Jan 22, 2025
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:
In certain scenarios, the internal dimensions of elements are returned as floating point numbers because of variables such as view scaling. The current comparison for showing / hiding the scrollbar in the multiline text input does not account for this. If it's the case where the ClipView within the multiline text input is a fraction smaller than the text itself, then the scrollbar persistently shows.
Test Plan:
Tested on local app - scrollview still shows at appropriate times.