-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
wrong "Unsaved changes" notification after duplication #42
Comments
I've noticed that the change indicator has seemed a bit buggy in general for the past while, mostly when you have multiple tabs open. Do you think you could dig further into it and submit a PR to fix the issue? |
@ericp-mrel is this something you'd be willing to take a look at? |
Here's what I've found so far. If you have multiple tabs open and you make changes to one of them, then all of the open tabs are being marked as modified. It seems like something is causing the change event to be re-triggered after the original change event is fired since there is a slight delay between the first tab's close button is changed and when the others change. There's also another issue related to the markup that's being added to the page when duplicating a page that's causing an issue with the modified counter not updating correctly. It seems like some of the form's hidden fields are being added as children inside a div, rather than being direct children to the actual form element itself. This is problematic because of the following selector: wn-pages-plugin/assets/js/pages-page.js Line 148 in 728d2f0
I haven't been able to figure out why this is happening yet. |
This is what I've found after digging around with the JS debugger a little bit. It seems like what's happening is when you make a change to an input field, the initial change event correctly fires and marks the active tab as modified. But then after that the |
@bennothommo @jaxwilko @mjauvin any thoughts? |
Winter CMS Build: 1.2.5
Pages Plugin Version: 2.1.3
PHP Version: 8.2.0
Description:
When a Page is duplicated and saved ("The page has been successfully saved.") the little icon on the right of the tab doesn't change (always a circle, not a X) and the system seems don't understand its status.
Steps To Reproduce:
Thanks.
The text was updated successfully, but these errors were encountered: