Skip to content
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

Fix Leave site? warning when not required #409

Merged
merged 2 commits into from
Dec 2, 2020

Conversation

larssandergreen
Copy link
Contributor

Before: Leave site? warning was triggered by onbeforeunload when saving the mailing draft or submitting the mailing and otherwise leaving the mailing (after the user had edited the design of the mailing).

After: Leave site? warning is only triggered when leaving the mailing while editing the mailing design in Mosaico and not in the CiviCRM parts of the mailing editor.

This change just checks if the Mosaico iframe is shown on the mailing editing page before triggering the Leave site? warning and does not trigger the warning if the iframe is not currently shown.

Before: Leave site? warning was triggered by onbeforeunload when saving the mailing draft or submitting the mailing and otherwise leaving the mailing (after the user had edited the design of the mailing).

After: Leave site? warning is only triggered when leaving the mailing while editing the mailing design in Mosaico and not in the CiviCRM parts of the mailing editor.

This change just checks if the Mosaico iframe is shown on the mailing editing page before triggering the Leave site? warning and does not trigger the warning if the iframe is not currently shown.
@larssandergreen
Copy link
Contributor Author

Much better, works for me

@mattwire mattwire merged commit 37b7c3c into veda-consulting-company:2.x Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants