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

Active (focused) editor loses focus on updateContents() for another editor in one page #809

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

Comments

@cutteroid
Copy link

If multiple editors are on page, when one editor focused and another one receives content updates with formatting the first editor loses focus.

Steps for Reproduction

  1. Visit http://beta.quilljs.com/playground/

  2. Insert HTML code

    <div id="editor-container1">
        <p><br></p>
    </div>
    
    <div id="editor-container2">
        <p><br></p>
    </div>
  3. Insert JS code

    var quill1 = new Quill('#editor-container1', {
        placeholder: 'Compose an epic...', theme: 'snow'
    });
    
    var quill2 = new Quill('#editor-container2', {
        placeholder: 'Compose an epic...', theme: 'snow'
    });
    
    quill1.on('text-change', function(delta, oldDelta, source) {
        if ( source == 'user' ) { quill2.updateContents(delta);  }
    });
  4. Select some format (for example, bold) in top editor and start typing

Expected behavior: bold symbols appearing in both editors

Actual behavior: focused editor loses focus after one bold symbol entered

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

Version: 1.0.0-beta.9

This misbehavior appeared after 7f1fa0d commit

@jhchen jhchen closed this as completed in 0e79858 Jul 21, 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