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

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

Merged

Conversation

daniloercoli
Copy link
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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants