[FIX] web_editor: fix error on section drag and drop
closes odoo/odoo#36801 X-original-commit: 0ae223609a860799135e7f6764c4cb8a08979b12 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -88,7 +88,16 @@ var SnippetEditor = Widget.extend({
|
||||
return $clone;
|
||||
},
|
||||
start: _.bind(self._onDragAndDropStart, self),
|
||||
stop: _.bind(self._onDragAndDropStop, self)
|
||||
stop: function () {
|
||||
// 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);
|
||||
}, 0);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user