diff options
| author | stefanorigano <stefano.rigano@gmail.com> | 2015-09-03 13:29:04 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-02-24 11:15:55 +0100 |
| commit | c4a896a8a0e2219879903d212f2324d0b85d7f00 (patch) | |
| tree | ba074db013da74aa7001e90bfab2ed5e58aa624c /addons/web_editor/static/src/js/summernote.js | |
| parent | 1d90e70244b579ffdc981c809558f6c510e0f1bf (diff) | |
[REF] website,web_editor: complete restyling
Diffstat (limited to 'addons/web_editor/static/src/js/summernote.js')
| -rw-r--r-- | addons/web_editor/static/src/js/summernote.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index e4d1c5b27c4..775c4398268 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -210,7 +210,7 @@ dom.merge = function (node, begin, so, end, eo, mergeFilter, all) { while(end.lastChild) {end = end.lastChild;} eo = end.textContent.length-1; } else if (end.tagName) { - + } else if (end.tagName && end.childNodes[so]) { end = end.childNodes[so]; so = 0; @@ -234,7 +234,7 @@ dom.merge = function (node, begin, so, end, eo, mergeFilter, all) { if (cur === begin) { if (!all) add = true; } - + __merge(cur); dom.orderClass(dom.node(cur)); @@ -1501,7 +1501,7 @@ $.summernote.pluginEvents.backspace = function (event, editor, layoutInfo) { dom.removeSpace(temp2.parentNode, temp2, 0, temp, 0); // clean before jump for not select invisible space between 2 tag temp2 = dom.lastChild(temp2); - + r = range.create(temp2, temp2.textContent.length, temp2, temp2.textContent.length); r.select(); @@ -1876,11 +1876,11 @@ eventHandler.modules.toolbar.button.updateRecentColor = function (elBtn, sEvent, font.style.color = sValue !== 'inherit' ? sValue : ""; } } else { + font.className = font.className.replace(/(^|\s+)bg-\S+/, ''); if (sValue.indexOf('bg-') !== -1) { font.className += ' ' + sValue; font.style.backgroundColor = ""; } else { - font.className = font.className.replace(/(^|\s+)bg-\S+/); font.style.backgroundColor = sValue !== 'inherit' ? sValue : ""; } } |
