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

Better support for composition on contenteditable (#394) #395

Merged

Conversation

hyojin
Copy link
Contributor

@hyojin hyojin commented Jan 23, 2020

Hi,

I'd like to suggest to change the way it gets caret positions on contenteditable.
the problem is that in some languages like Korean or Japanese,
a character is composed of multiple typings and the current way which is appending marker element & manipulate range breaks composition while typing.

ezgif-1-c5f7fdf652b8

To support composition better, I've changed to get positions from range without any manipulation.
It passes the unit tests of the menu position, but I'd like to get some advice if any case is missing.

Thank you
Related #394

* Get caret position from range instead of marker elem
@mrsweaters
Copy link
Collaborator

This looks great! Merging!

@mrsweaters mrsweaters merged commit 53f2577 into zurb:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants