Skip to content

Text input cursor position IOS - #38110

Closed
perunt wants to merge 8 commits into
react:mainfrom
perunt:text-input-cursor-position-fabric-ios
Closed

Text input cursor position IOS#38110
perunt wants to merge 8 commits into
react:mainfrom
perunt:text-input-cursor-position-fabric-ios

Conversation

@perunt

@peruntperunt commented Jun 28, 2023

Copy link
Copy Markdown

Summary:

Paper

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-07-04.at.13.07.51.mp4

Fabric

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-07-04.at.13.04.35.mp4

Changelog:

[iOS] [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 28, 2023
@analysis-bot

analysis-bot commented Jun 28, 2023

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a9,045,230-2,269
androidhermesarmeabi-v7a8,294,652-2,269
androidhermesx869,561,533-2,257
androidhermesx86_649,403,741-2,207
androidjscarm64-v8a9,604,770-1,445
androidjscarmeabi-v7a8,731,489-1,444
androidjscx869,691,821-1,437
androidjscx86_649,938,156-1,384

Base commit: 259a316
Branch: main

@peruntperunt changed the title Text input cursor position. Fabric IOSText input cursor position IOSJun 28, 2023
@perunt
perunt marked this pull request as ready for review July 4, 2023 11:09
@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 Jan 1, 2024
@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 Jan 2, 2024
@github-actionsgithub-actionsBot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 3, 2024
@peruntperunt mentioned this pull request Jan 25, 2024
50 tasks
@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.

1 similar comment
@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 Jul 1, 2024
@github-actions

Copy link
Copy Markdown

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@perunt@analysis-bot@facebook-github-bot