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

Weird issues with formatted text deletion #824

Closed
cutteroid opened this issue Jul 27, 2016 · 5 comments
Closed

Weird issues with formatted text deletion #824

cutteroid opened this issue Jul 27, 2016 · 5 comments

Comments

@cutteroid
Copy link

Cursor position is incorrect when deleting formatted text.

Steps for Reproduction

  1. Visit beta.quill.js

  2. put cursor at the beginnig of open source link in second paragraph and hit DEL.

    Expected behavior: first symbol of the link deleted, cursor position preserved

    Actual behavior: first symbol of the link deleted but cursor position changed

  3. put cursor at the end of open source link in second paragraph and delete link with BACKSPACE.

    Expected behavior: link deleted, cursor position preserved

    Actual behavior: cursor position changing after last symbol of the link deleted (reproducible in all browsers except Chrome)

Platforms: Firefox 49.0a2, Firefox 47.0.1, Chrome 52.0.2743.82 on OS X, IE 11, Edge on Windows 8

Version: 1.0.0-beta.9

@jhchen
Copy link
Member

jhchen commented Jul 28, 2016

Thanks for the report! I think this commit bfee0cb also fixed this issue and should be in the next release.

@cutteroid
Copy link
Author

In build from current develop branch step 2 fixed but step 3 is still reproducible

@jhchen
Copy link
Member

jhchen commented Jul 29, 2016

Sorry I did not notice you had different expected behaviors for backspace and delete. I do not agree with this. Most rich text editors do not treat links to be atomic and non to my knowledge exhibit different behavior for backspace and delete.

The expected behavior for Quill is that links are not atomic and consistent between backspace and delete: delete removes the character after the cursor, backspace removes the character before the cursor. You may add a custom keybindings to Keyboard if you wish to modify this.

@cutteroid
Copy link
Author

cutteroid commented Jul 30, 2016

I'm totally agree with described expected Quill behavior.
Looks like my description of issue was not very clear, sorry.

Here i'm deleting link with backspace. Notice where cursor appears after deletion.
bs

And i'm having this bug with all formatted text (links, bolds, italics etc)

@jhchen
Copy link
Member

jhchen commented Jul 30, 2016

Ah I see thank you for the clarification.

@jhchen jhchen closed this as completed in 6249648 Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants