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

Text input cursor position Android #38123

Closed

Conversation

perunt
Copy link

@perunt perunt commented Jun 29, 2023

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-bot facebook-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
Copy link

analysis-bot commented Jun 29, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,045,446 -15,324
android hermes armeabi-v7a 8,294,871 -15,226
android hermes x86 9,561,761 -15,219
android hermes x86_64 9,403,965 -15,439
android jsc arm64-v8a 9,605,212 -8,273
android jsc armeabi-v7a 8,731,925 -8,193
android jsc x86 9,692,257 -8,175
android jsc x86_64 9,938,596 -8,403

Base commit: ebc1fe6
Branch: main

@Pranav-yadav Pranav-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-bot facebook-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
Copy link

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-actions github-actions bot 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
Author

perunt commented Apr 11, 2024

Not stale

@github-actions github-actions bot 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
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-bot react-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
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Stale There has been a lack of activity on this issue and it may be closed soon. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants