Elastic: Fix TypeError: Argument 1 of MutationObserver.observe is not an object

pull/6405/head
Aleksander Machniak 6 years ago
parent 2935b3a66a
commit f85a33f150

@ -679,6 +679,16 @@ function rcube_elastic_ui()
rcmail.display_message(rcmail.gettext('nocontactselected'), 'warning');
}
});
// Update compose status bar on attachments list update
if (window.MutationObserver) {
var observer, list = $('#attachment-list'),
status_callback = function() { compose_status('attach', list.children().length > 0); };
observer = new MutationObserver(status_callback);
observer.observe(list[0], {childList: true});
status_callback();
}
}
// Append contact menu to all mailto: links
@ -687,16 +697,6 @@ function rcube_elastic_ui()
mailtomenu_append(this);
});
}
// Update compose status bar on attachments list update
if (window.MutationObserver) {
var observer, list = $('#attachment-list'),
status_callback = function() { compose_status('attach', list.children().length > 0); };
observer = new MutationObserver(status_callback);
observer.observe(list[0], {childList: true});
status_callback();
}
}
else if (rcmail.task == 'settings') {
rcmail.addEventListener('identity-encryption-show', function(p) {

Loading…
Cancel
Save