diff options
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin/text.js')
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/plugin/text.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js index 16e22939cd4..f2834c531f7 100644 --- a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js +++ b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js @@ -229,8 +229,11 @@ var TextPlugin = AbstractPlugin.extend({ $(br).before(emptyText).remove(); range = this.context.invoke('editor.setRange', emptyText, 0, emptyText, 1); } else { + var offset = range.so; this.context.invoke('HelperPlugin.insertTextInline', '\u200B'); - range.eo += 1; + range = this.context.invoke('editor.createRange'); + range.so = offset; + range.eo = offset + 1; } range.select(); } |
