Skip to content

Text input cursor position Android - #38123

Closed
perunt wants to merge 5 commits into
react:mainfrom
perunt:text-input-cursor-position-android
Closed

Text input cursor position Android#38123
perunt wants to merge 5 commits into
react:mainfrom
perunt:text-input-cursor-position-android

Conversation

@perunt

@peruntperunt commented Jun 29, 2023

Copy link
Copy Markdown

Summary:

telegram-cloud-document-2-5269476872743299526.mp4

Changelog:

[ANDROID] [ADDED] - Added {x, y} coordinates of text selection/cursor.

To achieve this, a new property has been added to track the cursor position, and the initializer has been updated to accept it. The conversion method has also been modified to parse this property from JSON and pass it to the updated initializer. This allows the code to handle cursor position alongside text selection information.

With this PR, the onSelectionChange method will now return the cursor position alongside the start and end positions, as follows:

selection: {
start: number,
end: number,
cursorPosition: {
start: {x: number, y: number},
end: {x: number, y: number}
}
}

Test Plan:

@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 29, 2023
@analysis-bot

analysis-bot commented Jun 29, 2023

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a9,045,446-15,324
androidhermesarmeabi-v7a8,294,871-15,226
androidhermesx869,561,761-15,219
androidhermesx86_649,403,965-15,439
androidjscarm64-v8a9,605,212-8,273
androidjscarmeabi-v7a8,731,925-8,193
androidjscx869,692,257-8,175
androidjscx86_649,938,596-8,403

Base commit: ebc1fe6
Branch: main

@Pranav-yadavPranav-yadav added the Type: Enhancement A new feature or enhancement of an existing feature. label Jun 29, 2023
@perunt
perunt marked this pull request as ready for review July 4, 2023 11:09
@facebook-github-botfacebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 13, 2023
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actionsgithub-actionsBot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 11, 2024
@perunt

Copy link
Copy Markdown
Author

Not stale

@github-actionsgithub-actionsBot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 12, 2024
@react-native-bot

Copy link
Copy Markdown
Collaborator

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@react-native-botreact-native-bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 9, 2024
@react-native-bot

Copy link
Copy Markdown
Collaborator

This PR was closed because it has been stalled for 7 days with no activity.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.StaleThere has been a lack of activity on this issue and it may be closed soon.Type: EnhancementA new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@perunt@analysis-bot@react-native-bot@facebook-github-bot@Pranav-yadav