-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Fabric] Fix TextInput caret visibility on white backgrounds in dark mode #14762
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
base: main
Are you sure you want to change the base?
Conversation
…or selection Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
@copilot run |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@copilot fix change file |
…restrictions Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
Fixed the change file type from "patch" to "prerelease" to comply with react-native-windows package restrictions in commit bb72729. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@copilot fix all CI pipeline issues including build failures and linting issues. |
Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
Fixed all identifiable CI pipeline issues in commit 00b48b2. Resolved formatting problems (trailing spaces, include ordering), verified builds and tests pass, and confirmed linting compliance. All CI components that can be verified locally are now working correctly. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Fixes TextInput caret becoming invisible when using white backgrounds in Windows dark mode. The issue occurred because the caret color defaulted to the theme's text color (white in dark mode), making it invisible against white TextInput backgrounds.
Problem
In dark mode, TextInputs with white backgrounds had invisible carets due to the fallback caret color logic:
Solution
Enhanced
updateCursorColor()
to choose caret color based on background contrast when no explicit cursor/foreground color is specified:Key Features
cursorColor
orforegroundColor
are explicitly setonThemeChanged()
IsColorLight
) as existing selection text logicTesting
The fix applies to the fallback case when neither
cursorColor
norforegroundColor
props are specified. It automatically adapts to:Fixes #14378.