Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Android Fix - cursor position - Return the exact location of the cursor in the editor#61

Merged
diegoreymendez merged 1 commit intomasterfrom
try/return-cursor-selection-absolute-position
Oct 18, 2018
Merged

Android Fix - cursor position - Return the exact location of the cursor in the editor#61
diegoreymendez merged 1 commit intomasterfrom
try/return-cursor-selection-absolute-position

Conversation

@daniloercoli
Copy link
Copy Markdown
Contributor

This PR does return the exact location of the cursor without taking in consideration the conversion to HTML code, that happens later and adds other content.
So basically any additional tags like B, I, etc, are not considered when returning the cursor position.

Note: When used into Gutenberg Mobile, the conversion back to the RichText structure is done React side, so we need to know the exact location of the cursor without considering the additional content (HTML tags) added during the conversion.

…on the convertion to HTML code, that happens later and adds other content. The conversion back to RichText structure is done React side, so we need to know the exact location of the cursor without considering the additinoal content (HTML tags) added during the conversion.
Copy link
Copy Markdown
Contributor

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't test this thoroughly because the ENTER event is not wired in the example app in this repo, but considering this'll be integrated into gutenberg-mobile, we'll have a good opportunity to make sure it works fine.

At this time all I can say is the example App still works in both platforms.

@diegoreymendez diegoreymendez merged commit b8cdd46 into master Oct 18, 2018
@diegoreymendez diegoreymendez deleted the try/return-cursor-selection-absolute-position branch October 18, 2018 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants