You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since upgrading to WP 6.6.2 (from 6.5.x), we’ve noticed that whenever a user navigates away from their profile page, they are shown the “Leave site? Changes you made may not be saved” dialog. It appears to stem from the disabling of managed fields, as commenting that out prevents the issue (but also then doesn’t disable the fields, naturally)
My research led to me find that: “”When you disable a form field in JavaScript and the user attempts to leave the page, it can trigger the browser’s “Leave Site?” dialog. This is because the browser considers a disabled field as having unsaved changes.”
I’m not sure what would have changed from 6.5 -> 6.6 to cause the change. As the fields don’t appear filterable with PHP, I’m struggling to find an alternative solution to disabling managed fields that doesn’t trigger such an error when leaving the page.
The text was updated successfully, but these errors were encountered:
Hi there! I already posted on the wp.org forums, but not sure which you prefer so I'm duplicating here (https://wordpress.org/support/topic/since-wp-6-6-navigating-away-from-profile-page-prompts-leave-site-dialog/)
Since upgrading to WP 6.6.2 (from 6.5.x), we’ve noticed that whenever a user navigates away from their profile page, they are shown the “Leave site? Changes you made may not be saved” dialog. It appears to stem from the disabling of managed fields, as commenting that out prevents the issue (but also then doesn’t disable the fields, naturally)
My research led to me find that: “”When you disable a form field in JavaScript and the user attempts to leave the page, it can trigger the browser’s “Leave Site?” dialog. This is because the browser considers a disabled field as having unsaved changes.”
I’m not sure what would have changed from 6.5 -> 6.6 to cause the change. As the fields don’t appear filterable with PHP, I’m struggling to find an alternative solution to disabling managed fields that doesn’t trigger such an error when leaving the page.
The text was updated successfully, but these errors were encountered: