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

[5.x] Prevent "Are you sure you want to leave this page?" when using Money fieldtype #902

Merged
merged 2 commits into from Aug 19, 2023

Conversation

duncanmcclean
Copy link
Owner

@duncanmcclean duncanmcclean commented Aug 19, 2023

This pull request should hopefully fix the "Are you sure you want to leave this page?" warning from appearing on any of the publish forms using the Money Fieldtype.

It was being caused by the code in the mounted method of the fieldtype. I've removed it from there in favour of the code in the preProcess method on the PHP side which looks to be doing exactly the same thing.

Fixes #897

It seems we're doing the same logic on the PHP side in the preProcess method so we don't need to do it here, especially if it's doing exactly the same thing 😅
@duncanmcclean duncanmcclean merged commit ca3376b into 5.x Aug 19, 2023
5 checks passed
@duncanmcclean duncanmcclean deleted the fix/money-fieldtype-warning branch August 19, 2023 20:52
@github-actions
Copy link

Released as part of v5.3.5.

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.

Price fieldtype causing "Are you sure you want to leave this page?"
1 participant