diff --git a/addons/web_editor/static/src/js/editor/summernote.js b/addons/web_editor/static/src/js/editor/summernote.js index 1053e0699bc..01269589811 100644 --- a/addons/web_editor/static/src/js/editor/summernote.js +++ b/addons/web_editor/static/src/js/editor/summernote.js @@ -1031,6 +1031,7 @@ options.styleTags = weDefaultOptions.styleTags; $.summernote.pluginEvents.insertTable = function (event, editor, layoutInfo, sDim) { var $editable = layoutInfo.editable(); + $editable.focus(); var dimension = sDim.split('x'); var r = range.create(); if (!r) return; @@ -1658,6 +1659,7 @@ function isFormatNode(node) { $.summernote.pluginEvents.insertUnorderedList = function (event, editor, layoutInfo, type) { var $editable = layoutInfo.editable(); + $editable.focus(); $editable.data('NoteHistory').recordUndo($editable); type = type || "UL"; @@ -1986,6 +1988,7 @@ $.summernote.pluginEvents.outdent = function (event, editor, layoutInfo) { $.summernote.pluginEvents.formatBlock = function (event, editor, layoutInfo, sTagName) { $.summernote.pluginEvents.applyFont(event, editor, layoutInfo, null, null, "Default"); var $editable = layoutInfo.editable(); + $editable.focus(); $editable.data('NoteHistory').recordUndo($editable); event.preventDefault();