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

Behaves unexpectedly with contentEditable on Enter click after mentioning #50

Closed
TetianaP opened this issue Jan 20, 2017 · 2 comments
Closed
Labels

Comments

@TetianaP
Copy link

How can we reproduce this bug?

  1. Create a simple application with <div class="mentionable">Some text.</div>

  2. Initialize Tribute as new Tribute({ values: [ {key: 'Phil Heartman', value: 'pheartman'}, {key: 'Gordon Ramsey', value: 'gramsey'} ]
    and attach to the contentEditable tribute.attach(document.querySelectorAll('.mentionable'));

  3. Type @ to see the possible options to mention
    image
    and select any
    image

  4. Continue typing on the same line
    image
    then press 'Enter' key
    image

What did you expect to happen?
Cursor moves to the next line.

What happened instead?
Cursor moves back to the place after mention and some part of a mention appears after it.
Trying to press 'Enter' again together with printing some text continue to insert some part of mentioning and moving cursor.

Link (jsfiddle/plunkr) or Screenshot:
image

@mrsweaters mrsweaters added the bug label Jan 20, 2017
@mrsweaters
Copy link
Collaborator

This was caused by not wrapping the content for contentEditable elements in markup in the defaultSelectTemplate. Fixed in 37fa6e8

Thank you!

@TetianaP
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants