Placeholder 2
This commit is contained in:
@@ -1 +1 @@
|
||||
1.1.68
|
||||
1.1.69
|
||||
@@ -521,13 +521,32 @@ const refreshPlaceholderComponent = (component) => {
|
||||
}
|
||||
});
|
||||
|
||||
const closeModalSafe = () => {
|
||||
if (!modal) return;
|
||||
const modalWindow = (modal.el && modal.el.ownerDocument && modal.el.ownerDocument.defaultView) || window;
|
||||
if (modalWindow && modalWindow.B && typeof modalWindow.B.allowModalCloseOnce === 'function') {
|
||||
modalWindow.B.allowModalCloseOnce();
|
||||
}
|
||||
if (typeof modal.__bridgeOriginalClose === 'function') {
|
||||
modal.__bridgeOriginalClose();
|
||||
return;
|
||||
}
|
||||
if (typeof modal.close === 'function') {
|
||||
modal.close();
|
||||
return;
|
||||
}
|
||||
if (modal.getModel && typeof modal.getModel === 'function') {
|
||||
const mdl = modal.getModel();
|
||||
if (mdl && typeof mdl.set === 'function') {
|
||||
mdl.set('open', false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
cancelBtn.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
fireCancel('cancel-button');
|
||||
if (window.B && typeof window.B.allowModalCloseOnce === 'function') {
|
||||
window.B.allowModalCloseOnce();
|
||||
}
|
||||
modal.close();
|
||||
closeModalSafe();
|
||||
});
|
||||
|
||||
const applyPayload = (payload) => {
|
||||
@@ -603,10 +622,7 @@ const refreshPlaceholderComponent = (component) => {
|
||||
}
|
||||
}
|
||||
didSave = true;
|
||||
if (window.B && typeof window.B.allowModalCloseOnce === 'function') {
|
||||
window.B.allowModalCloseOnce();
|
||||
}
|
||||
modal.close();
|
||||
closeModalSafe();
|
||||
});
|
||||
|
||||
toggleSections();
|
||||
|
||||
Reference in New Issue
Block a user