8000 fix: Remove need for timeout to close modal by fsbraun · Pull Request #8183 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Remove need for timeout to close modal #8183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 26, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add try catch
  • Loading branch information
fsbraun committed Mar 26, 2025
commit 0a8c7bc66076065bbc81a8ebb278234b497bf5c4
9797 9 changes: 7 additions & 2 deletions cms/static/cms/js/modules/cms.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,13 @@ class Modal {
that.close();
// the dataBridge is used to access plugin information from different resources
// Do NOT move this!!!
CMS.API.Helpers.dataBridge = JSON.parse(dataBridge.textContent);
CMS.API.Helpers.onPluginSave();
try {
CMS.API.Helpers.dataBridge = JSON.parse(dataBridge.textContent);
CMS.API.Helpers.onPluginSave();
} catch (e) {
// istanbul ignore next
Helpers.reloadBrowser();
}
}
}
} else {
Expand Down
Loading
0