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

Cursor jumps to the beginning of the line when calling quill.updateContents(delta) #736

Closed
benbro opened this issue Jun 7, 2016 · 1 comment

Comments

@benbro
Copy link
Contributor

benbro commented Jun 7, 2016

[Describe the issue]
When applying a delta (collaborative editor) while the editor is focused, the cursor jumps to the beginning of the line.

Steps for Reproduction

  1. Visit http://beta.quilljs.com/
  2. select all the text (ctrl+a) and delete it (backspace)
  3. type the character 'a'
  4. run the following in the console:
setTimeout(function() {quill.updateContents({
  ops: [
    { retain: 1 },
    { insert: 'b' },
    { retain: 1 }
  ]
});}, 5000);
  1. place the cursor after the letter 'a' in the editor and wait for the timeout to fire.

Expected behavior: [expected]
The cursor should be between 'a' and 'b':
a|b

Actual behavior: [actual]
The cursor jumps to the beginning of the line, before a:
|ab

Platforms:
Firefox 46 on Windows 7

Version: [version]
1.0-beta.4

@jhchen
Copy link
Member

jhchen commented Jun 8, 2016

I believe this has the same root cause as #731 so folding it into that issue.

@jhchen jhchen closed this as completed Jun 8, 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

2 participants