diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-02-27 16:42:22 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-02-28 11:55:20 +0100 |
| commit | b9a763ba3cf310f394b7c80b5f56c114e9242ebb (patch) | |
| tree | d719013bfa8db8e7576daf532f82218d1b9bba89 /addons/web_editor/static/src/js/editor/summernote.js | |
| parent | 74a813542fcbcc069024db8f52aedc1199a879e6 (diff) | |
[FIX] web_editor: avoid unnecessary slowdown of the web client
create range method slow down all the web client because the handler who
use this method it's in the module (not in the widget method) and called
for each click and keyup. We need only this handler for the iframe or the
website, used by the rte.
Diffstat (limited to 'addons/web_editor/static/src/js/editor/summernote.js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/summernote.js | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/addons/web_editor/static/src/js/editor/summernote.js b/addons/web_editor/static/src/js/editor/summernote.js index 121a1a6d3d7..0d1860d236e 100644 --- a/addons/web_editor/static/src/js/editor/summernote.js +++ b/addons/web_editor/static/src/js/editor/summernote.js @@ -1969,15 +1969,6 @@ eventHandler.modules.toolbar.button.updateRecentColor = function (elBtn, sEvent, return false; }; -$(document).on('click keyup', function () { - var $popover = $((range.create()||{}).sc).closest('[contenteditable]'); - var popover_history = ($popover.data()||{}).NoteHistory; - if (!popover_history || popover_history === history) return; - var editor = $popover.parent('.note-editor'); - $('button[data-event="undo"]', editor).attr('disabled', !popover_history.hasUndo()); - $('button[data-event="redo"]', editor).attr('disabled', !popover_history.hasRedo()); -}); - eventHandler.modules.editor.undo = function ($popover) { if (!$popover.attr('disabled')) $popover.data('NoteHistory').undo(); }; |
