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

Add cursorColor support to TextInput #11502

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Conversation

dlitsman
Copy link
Contributor

@dlitsman dlitsman commented Apr 17, 2023

Description

I've added the support for the cursorColor property to the macOS repo already. This PR will help to keep parity between platforms microsoft/react-native-macos#1787

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

The cusrorColor property is already available on macOS after microsoft/react-native-macos#1787 and documented in the docs https://reactnative.dev/docs/textinput#cursorcolor-android. However, there is currently no way to update the cursor/caret color on Windows.

What

  • I've extended HideCaretIfNeeded logic to support the custom color of a caret. This function is already, in a sense, changing the color of a caret; however, it always sets it to be transparent. Now, we allow custom colors as well
  • Updated demo textinput page to have test cases for it

Screenshots

React.Native.Playground.Win32.2023-04-16.19-10-09.mp4
Microsoft Reviewers: Open in CodeFlow

@dlitsman dlitsman requested review from a team as code owners April 17, 2023 09:39
@jonthysell
Copy link
Contributor

@acoates-ms, if they need it for paper, I assume we'll need it for Fabric too?

@acoates-ms
Copy link
Contributor

Yeah, this PR at least adds the property to the props object so its ready to implement. We should add it to the list of props to implement on fabric.

@jonthysell jonthysell merged commit f9c92c6 into microsoft:main Apr 21, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) label Apr 21, 2023
@jonthysell jonthysell removed the Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants