[FIX] web_editor: restore removal of spinner
This commit is contained in:
@@ -33,6 +33,10 @@ async function createWysiwyg(parent, options, additionnalAssets = []) {
|
||||
}
|
||||
|
||||
async function loadFromTextarea(parent, textarea, options) {
|
||||
var loading = textarea.nextElementSibling;
|
||||
if (loading && !loading.classList.contains('o_wysiwyg_loading')) {
|
||||
loading = null;
|
||||
}
|
||||
const $textarea = $(textarea);
|
||||
const currentOptions = Object.assign({}, options);
|
||||
if (!currentOptions.value || !currentOptions.value.trim()) {
|
||||
@@ -76,6 +80,11 @@ async function loadFromTextarea(parent, textarea, options) {
|
||||
$textarea.val(await wysiwyg.getValue());
|
||||
});
|
||||
|
||||
// Remove the loading spinner.
|
||||
if (loading) {
|
||||
loading.parentNode.removeChild(loading);
|
||||
}
|
||||
|
||||
return wysiwyg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user