[FIX] web_editor: fix section drag and drop error (2)
Forward-port of https://github.com/odoo/odoo/commit/6f14b488fb380c6a3f1b7361b9901de3f07fd9ea was not properly done.
This commit is contained in:
@@ -77,14 +77,13 @@ var SnippetEditor = Widget.extend({
|
||||
return $clone;
|
||||
},
|
||||
start: this._onDragAndDropStart.bind(this),
|
||||
stop: function () {
|
||||
stop: (...args) => {
|
||||
// Delay our stop handler so that some summernote handlers
|
||||
// which occur on mouseup (and are themself delayed) are
|
||||
// executed first (this prevents the library to crash
|
||||
// because our stop handler may change the DOM).
|
||||
var args = arguments;
|
||||
setTimeout(function () {
|
||||
self._onDragAndDropStop.apply(self, args);
|
||||
setTimeout(() => {
|
||||
this._onDragAndDropStop(...args);
|
||||
}, 0);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user