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

Broken handling of composed unicode characters #1444

Closed
adrien-n opened this issue May 4, 2017 · 3 comments
Closed

Broken handling of composed unicode characters #1444

adrien-n opened this issue May 4, 2017 · 3 comments

Comments

@adrien-n
Copy link

adrien-n commented May 4, 2017

Hi,

I have noticed that character composition is handled in a weird way which is moreover inconsistent with at least Firefox.

Take X for instance. This was generated through the Zalgo text generator at https://eeemo.net . The base character was simply an 'X'.

If I put the character, place my cursor after it and press [backspace], only one component is removed. This is consistent with Firefox in general.

However, if I place my cursor in front of it and press [del], only the base "X" is removed and this is not consistent with Firefox which removes the whole composition. I expect other browsers to remove everything too.

Strictly speaking, changing that is likely an API change: for the [del] case, the delta given to the "text-changed" callback is a delete(1) while it should be delete(9) to remove everything. However I have serious doubts that people are currently relying on such a behaviour because it makes handling of composed characters very difficult and is also quite meaningless. Moreover, it makes it impossible to devise sane semantics for merging operations which involve at least one composed character.

Tested on FF 52 on Linux with Quill 1.2.4.

edit: I have no idea how I didn't notice it but #1437 might be related.

edit: fixed formating

@jhchen
Copy link
Member

jhchen commented May 4, 2017

This is a manifestation of Javascript has a Unicode Problem. I think #1437 has a different root cause.

@mogsie
Copy link

mogsie commented Feb 27, 2018

It works when I paste this into the interactive playground: Del deletes the whole composition. This is on the latest chrome (63).

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

No branches or pull requests

4 participants