diff --git a/source/packages/plg_system_mokosuitebackup/media/js/installer-backup.js b/source/packages/plg_system_mokosuitebackup/media/js/installer-backup.js index e3f5ac4a..cb64a736 100644 --- a/source/packages/plg_system_mokosuitebackup/media/js/installer-backup.js +++ b/source/packages/plg_system_mokosuitebackup/media/js/installer-backup.js @@ -131,20 +131,34 @@ if (box) { box.checked = true; } }); - /* Joomla's list-check reads boxchecked — set it so the re-fire passes. */ + /* Restore boxchecked AND fire its `change` event. Joomla's toolbar web + component (joomla-toolbar-button) keeps a list-selection button + DISABLED until boxchecked changes via a change event — setting the + value alone leaves the button disabled, so executeTask() would no-op + and the update never submits (it just returns to the list). */ var bc = form.querySelector('input[name="boxchecked"]'); - if (bc) { bc.value = (data.cids || []).length; } + if (bc) { + bc.value = (data.cids || []).length; + bc.dispatchEvent(new Event('change', { bubbles: true })); + } } window.__msbResuming = true; - var btn = document.querySelector('[task="' + data.task + '"]'); + /* Re-fire the toolbar action. The `task` attribute is on the OUTER + , but its click handler is bound to the INNER +