diff options
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin/helper.js')
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/plugin/helper.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/helper.js b/addons/web_editor/static/src/js/wysiwyg/plugin/helper.js index a025d6a0082..1738e6e7b48 100644 --- a/addons/web_editor/static/src/js/wysiwyg/plugin/helper.js +++ b/addons/web_editor/static/src/js/wysiwyg/plugin/helper.js @@ -1885,6 +1885,9 @@ var HelperPlugin = AbstractPlugin.extend({ // Create empty text node to have a range into the node if (range.sc.tagName && !dom.isVoid(range.sc) && !range.sc.childNodes[range.so]) { $(range.sc).append(invisible); + if (invisible.previousSibling && invisible.previousSibling.tagName === "BR") { + invisible.previousSibling.remove(); + } range = this.context.invoke('editor.setRange', invisible, 0); } |
