MDL-79384 core: fix modal footer logic when rendering it from template

If the footer property is a Templates.render() promise, and the modal is
set to show immediately (show=true), the show() logic - which contains
the footer show/hide logic - can run before the footer content is set
(i.e. before the promise chain is complete). In such cases, the footer
will be marked as hidden and must be made visible again.
This commit is contained in:
Jake Dallimore 2023-09-18 15:55:53 +08:00
parent ecddfa6ccd
commit 6b214f1c81
No known key found for this signature in database
3 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -642,6 +642,7 @@ export default class Modal {
})
.then((footer) => {
this.footerPromise.resolve(footer);
this.showFooter();
return;
})
.catch(Notification.exception);