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

fix(textinput): Account for float dimensions when showing scroller #2341

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

lawrencewin
Copy link

@lawrencewin lawrencewin commented Jan 17, 2025

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.
image

@lawrencewin lawrencewin marked this pull request as ready for review January 21, 2025 23:57
@lawrencewin lawrencewin requested a review from a team as a code owner January 21, 2025 23:57
@lawrencewin lawrencewin requested a review from Saadnajmi January 21, 2025 23:58
@Saadnajmi Saadnajmi changed the title Account for float dimensions when showing scroller fix(textinput): Account for float dimensions when showing scroller Jan 22, 2025
@Saadnajmi Saadnajmi merged commit 0df1000 into microsoft:main Jan 22, 2025
12 checks passed
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]>
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 that referenced this pull request Jan 22, 2025
…ler (#2350)

Backporting changes from #2341, see PR for details.
lawrencewin added a commit that referenced this pull request Jan 22, 2025
…ler (#2353)

Backporting changes from #2341, see PR for details.
lawrencewin added a commit that referenced this pull request Jan 22, 2025
…ler (#2354)

Backporting changes from #2341, see PR for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants