[FIX] web_editor: prevent traceback on create and quick discard mailing
In mass_mailing: 1. Click CREATE 2. As soon as it appears, click "DISCARD" 3. Wait a little bit -> A traceback appeared. That is because wysiwyg was still busy starting and, in that process, requested the window object of the iframe that was already removed. closes odoo/odoo#84358 X-original-commit: 48ce4f0f834b55692e32868194a635b817c6ed13 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -1232,6 +1232,10 @@ const Wysiwyg = Widget.extend({
|
||||
const eventName = elem.dataset.eventName;
|
||||
let colorpicker = null;
|
||||
const mutex = new concurrency.MutexedDropPrevious();
|
||||
if (!elem.ownerDocument.defaultView) {
|
||||
// In case the element is not in the DOM, don't do anything with it.
|
||||
continue;
|
||||
}
|
||||
// If the element is within an iframe, access the jquery loaded in
|
||||
// the iframe because it is the one who will trigger the dropdown
|
||||
// events (i.e hide.bs.dropdown and show.bs.dropdown).
|
||||
|
||||
Reference in New Issue
Block a user