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

Use contenteditable false instead of zwj #423

Conversation

laurenbarker
Copy link
Contributor

Replacing #394

  • new branch so dependencies are not impacted by squashing commits/rebasing

Purpose

Fix unusual contenteditable behavior in WebKit browsers as described in #393.

Changes

  • remove zero width joiner from end of span
  • add contenteditable="false" to inserted span

Side effects

Deleting the mention/emoji deletes the trigger (@, :, etc.).

Using contenteditable="false" may cause unexpected behavior in old browsers or IE. I only tested this in Chrome, Firefox, and Safari. This article from 2014 describes a bug when using contenteditable="false" in Chrome and Safari but I couldn't reproduce it so it appears to be fixed.

compile changes

fix insert node

Compile after rebase
@ichord ichord merged commit e18af47 into ichord:master Aug 23, 2016
@ichord
Copy link
Owner

ichord commented Aug 23, 2016

Good job, thanks @leb2dg

escopecz added a commit to escopecz/mautic that referenced this pull request May 3, 2017
sakalauskas added a commit to sakalauskas/At.js that referenced this pull request Jun 2, 2017
fabmiz added a commit to fabmiz/At.js that referenced this pull request Jun 22, 2017
cubeguerrero added a commit to zendesk/At.js that referenced this pull request Jul 20, 2018
Spuds added a commit to Spuds/At.js that referenced this pull request May 30, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants