From 1f79dedfa8f8c8157bf7444c54d9d74d91d33350 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Fri, 10 Jul 2015 11:44:13 +0200 Subject: [PATCH] [FIX] website: popUndo doesn't exist The function popUndo doesn't exist in summernote. But this function exists in our RTE. The edition of a comment in the website forum uses summernote and then it crashes when using popUndo. In the forum, when writing a reply, if you highlighted a text and I clicked on the link icon to hyperlink the text, neither the OK button nor the cross button closed the popup. This commit solved this bug. In our RTE, the function popUndo is never used then it can be deleted. opw:644486 --- addons/website/static/src/js/website.editor.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index e0b042be1aa..360a8b1607c 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -371,12 +371,10 @@ define(['summernote/summernote'], function () { linkInfo.range.select(); $editable.data('range', linkInfo.range); def.resolve(linkInfo); - $editable.data('NoteHistory').popUndo(); $('.note-popover .note-link-popover').show(); }); editor.on("cancel", this, function () { def.reject(); - $editable.data('NoteHistory').popUndo(); }); return def; }; @@ -856,11 +854,6 @@ define(['summernote/summernote'], function () { return aUndo.length > pos+1; }; - this.popUndo = function () { - pos--; - aUndo.pop(); - }; - var last; this.recordUndo = function ($editable, event, internal_history) { if (!internal_history) {