-
Notifications
You must be signed in to change notification settings - Fork 3
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
Changetracker fired on load #11
Comments
We might be seeing something similar on one of our sites and we don't use this field, so it might be caused by something else. |
Interesting, could it be something from a recent change in one of core repos? I'm running this on v4.7.3 currently so wondering if it might be a 4.8 thing? |
I don’t think anything’s changed with changetracking (https://github.com/silverstripe/silverstripe-admin/commits/1/thirdparty/jquery-changetracker), and if I remove the field entirely the issue goes away too so I’m pretty sure it’s something to do with this. It seems to happen when the react component replaces the standard input, I wonder if it may be something as simple as the name/value being slightly different once the field is react-rendered, and that’s causing the serialized value of the form to change and trigger the changetracker: https://github.com/silverstripe/silverstripe-admin/blob/d3fc48cde0aef36518d0b7efd11dd5711bef6be4/thirdparty/jquery-changetracker/lib/jquery.changetracker.js#L99-L114 |
I can’t for the life of me figure out why, but the change tracker marks the page as “dirty” on load if using this on non-inline-editable content blocks.
I’ve tried adding
no-change-track
to all the form inputs, but to no avail 😢For now I’m working around this by destroying the change tracker and re-initialising it: bigfork@2a5536a. It’s ugly, but it works 😅
The text was updated successfully, but these errors were encountered: