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

Error when deleting newline/paragraph #811

Closed
cutteroid opened this issue Jul 22, 2016 · 0 comments
Closed

Error when deleting newline/paragraph #811

cutteroid opened this issue Jul 22, 2016 · 0 comments

Comments

@cutteroid
Copy link

Error in console and incorrect text caret position after newline/paragraph deletion

Steps for Reproduction

  1. Visit editor page
  2. Run in console
    quill.pasteHTML("<p><br></p><p>test</p>");
  3. Put text cursor on the end of first paragraph (optionally type some symbols) and hit DEL

Expected behavior:
newline correctly removed and cursor position preserved.

Actual behavior:
if first paragraph has text - newline removed but cursor position shifted
if there no text in first paragraph - newline removed with error in console

quill.js:5506 Uncaught IndexSizeError: Failed to execute 'setStart' on 'Range': The offset -1 is larger than or equal to the nodes length (4).

Platforms: Firefox 47, Firefox 49.0a2 and Chrome 51.0.2704.106 on OS X

Version: 1.0.0-beta.9

@jhchen jhchen closed this as completed in bfee0cb Jul 25, 2016
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

1 participant