diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-02-14 18:09:24 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-02-14 18:09:24 +0100 |
| commit | c1fe9f18d5a1f6c13548ea2af964bde40b3b6861 (patch) | |
| tree | 811d2b54d9d6867741ffd6ce26e3baf292d4e1fb /addons/web_editor/static/lib/summernote/src/js | |
| parent | 18228f9c4e1642a3c0afb24223bccfb3354c928a (diff) | |
| parent | 69719f598aad2eb8ff87687bc47900030688f0ce (diff) | |
[MERGE] forward port branch 10.0 up to 69719f598aa
Diffstat (limited to 'addons/web_editor/static/lib/summernote/src/js')
| -rw-r--r-- | addons/web_editor/static/lib/summernote/src/js/EventHandler.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js index 1cb9cd8e1c7..d8dcbe18a8b 100644 --- a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js +++ b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js @@ -207,11 +207,15 @@ define([ var layoutInfo = dom.makeLayoutInfo(target); /* ODOO: (start_modification */ var $editable = layoutInfo.editable(); - if (!event.isDefaultPrevented()) { - modules.editor.saveRange($editable); + if (event.setStyleInfoFromEditable) { + var styleInfo = modules.editor.styleFromNode($editable); + } else { + if (!event.isDefaultPrevented()) { + modules.editor.saveRange($editable); + } + var styleInfo = modules.editor.currentStyle(target); } /* ODOO: end_modification) */ - var styleInfo = modules.editor.currentStyle(target); self.updateStyleInfo(styleInfo, layoutInfo); }, 0); }; |
