fix GrapesJS save button spinner visibility

Replace Bootstrap-dependent class toggling (d-none) with inline style.display for the save button spinner.

Update the pagebuilder view to use inline display:none instead of the d-none class on the spinner element.
This commit is contained in:
2026-11-23 17:58:13 +01:00
parent fcc5c4a96e
commit e86fba0809
4 changed files with 5 additions and 5 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -573,11 +573,11 @@
if (button.classList.contains('waiting')) {
button.removeAttribute("disabled");
button.classList.remove('waiting');
if (spinner) spinner.classList.add('d-none');
if (spinner) spinner.style.display = "none";
} else {
button.setAttribute("disabled", "true");
button.classList.add('waiting');
if (spinner) spinner.classList.remove('d-none');
if (spinner) spinner.style.display = "";
}
}
@@ -129,7 +129,7 @@ require __DIR__ . '/grapesjs/trait-manager.php';
<div id="sidebar-bottom-buttons" class="flex items-center justify-between">
<button id="save-page" class="btn btn-sm btn-success flex-1 rounded-none text-white gap-2" data-url="<?= phpb_url('pagebuilder', ['action' => 'store', 'page' => $page->getId()]) ?>">
<span class="loading loading-spinner loading-xs d-none" role="status" aria-hidden="true"></span>
<span class="loading loading-spinner loading-xs" style="display: none;" role="status" aria-hidden="true"></span>
<i class="fa fa-save"></i>
<span><?= phpb_trans('pagebuilder.save-page') ?></span>
</button>