From 815c026188ceadde8bb4beb9a4f09acdda735a2c Mon Sep 17 00:00:00 2001 From: Ivan Virabyan Date: Thu, 25 Jun 2015 14:12:35 +0300 Subject: [PATCH] Changed special character, used to set cursor out of inserted mention. Closes #23 Previously used character '\uFEFF' is not working properly in some fonts, so '\u200B' was used instead. Putting this character is a standard hack to put cursor out of the inserted node. See http://stackoverflow.com/questions/21574522/contenteditable-put-caret-outside-inserted-span --- jquery.mentions.coffee | 2 +- jquery.mentions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.mentions.coffee b/jquery.mentions.coffee index 9540089..28dae73 100644 --- a/jquery.mentions.coffee +++ b/jquery.mentions.coffee @@ -132,7 +132,7 @@ $.widget( "ui.editablecomplete", $.ui.areacomplete, class MentionsBase - marker: '\uFEFF', + marker: '\u200B', constructor: (@input, options) -> @options = $.extend({}, @settings, options) diff --git a/jquery.mentions.js b/jquery.mentions.js index beb8346..957add6 100644 --- a/jquery.mentions.js +++ b/jquery.mentions.js @@ -162,7 +162,7 @@ MentionsBase = (function() { - MentionsBase.prototype.marker = '\uFEFF'; + MentionsBase.prototype.marker = '\u200B'; function MentionsBase(input, options) { this.input = input;