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/isFocused): correctly handle null focused input #13219

Merged
merged 4 commits into from May 13, 2024

Conversation

servusdei2018
Copy link
Contributor

@servusdei2018 servusdei2018 commented May 11, 2024

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

Resolves 2 TODO items.

What

I've modified the isFocused function to correctly handle the case when there's no input focused. Previously, the function returned true when TextInputState.currentlyFocusedInput() was null, leading to incorrect behavior. The fix ensures that the function now returns false when there's no input focused.

Changelog

Should this change be included in the release notes: yes

Summary: Fixed isFocused function to handle null focused input correctly

Microsoft Reviewers: Open in CodeFlow

@servusdei2018 servusdei2018 requested review from a team as code owners May 11, 2024 02:32
@acoates-ms acoates-ms merged commit e2a0c87 into microsoft:main May 13, 2024
53 checks passed
acoates-ms added a commit to acoates-ms/react-native-windows that referenced this pull request May 14, 2024
…oft#13219)

* Change files

* fix(TextInput/isFocused): correctly handle null focused input

Signed-off-by: Nathanael Bracy <nate@bracy.dev>

* fix

---------

Signed-off-by: Nathanael Bracy <nate@bracy.dev>
Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
acoates-ms added a commit that referenced this pull request May 14, 2024
* Cleanup the snapshots in E2E test app (#13229)

* Cleanup the snapshots

* format

* Process snapshots so that ImageSource Uri's are consistent

* Change files

* fix

* fix

* fix(TextInput/isFocused): correctly handle null focused input (#13219)

* Change files

* fix(TextInput/isFocused): correctly handle null focused input

Signed-off-by: Nathanael Bracy <nate@bracy.dev>

* fix

---------

Signed-off-by: Nathanael Bracy <nate@bracy.dev>
Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>

* Fixing crash when passing null children to view with no-hide-descendents (#13224)

* Preventing crash when passing null children to view with no-hide-descendents

* Change files

---------

Co-authored-by: Sam Walker <sawalker@microsoft.com>
Co-authored-by: Andrew <30809111+acoates-ms@users.noreply.github.com>

* C++20: use view() instead of str() to avoid a copy, use starts_with (#13218)

* Change files

* C++20: use view() instead of str() to avoid a copy, use starts_with

Signed-off-by: Nathanael Bracy <nate@bracy.dev>

* fix

* Apply changefile modifications from code review

Co-authored-by: Jon Thysell <thysell@gmail.com>

* Revert package.json

Signed-off-by: Nathanael Bracy <nate@bracy.dev>

---------

Signed-off-by: Nathanael Bracy <nate@bracy.dev>
Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
Co-authored-by: Jon Thysell <thysell@gmail.com>

* ViewComponentView should be activatable from rn-win32.dll (#13225)

* ViewComponentView should be activatable from rn-win32.dll

* Change files

* Cleanup the snapshots in E2E test app (#13229)

* Cleanup the snapshots

* format

* Process snapshots so that ImageSource Uri's are consistent

* Change files

* fix

* fix

* lint

* format

* Revert "C++20: use view() instead of str() to avoid a copy, use starts_with (#13218)"

This reverts commit 71335b5.

---------

Signed-off-by: Nathanael Bracy <nate@bracy.dev>
Co-authored-by: Nate <37554478+servusdei2018@users.noreply.github.com>
Co-authored-by: Sam Walker <samuel.ls.walker@gmail.com>
Co-authored-by: Sam Walker <sawalker@microsoft.com>
Co-authored-by: Jon Thysell <thysell@gmail.com>
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.

None yet

2 participants