mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-18 03:00:56 +01:00
Move setting currentValues after we initialize the toggleables. It's needed because otherwise the DOM is slighltly different, for example the select has a default value, while after initializing the toggleables, if the select is not enabled, the default value is null. Fixes the annoying "unsaved changes" promp appearing even when no changes were made to the page.
This commit is contained in:
@@ -113,6 +113,9 @@
|
||||
scanToggleable(this);
|
||||
scan(this);
|
||||
this.scanned = true;
|
||||
|
||||
//We can now initialize window.currentValues as toggleables are initialized
|
||||
window.currentValues = getState();
|
||||
};
|
||||
|
||||
Form.factories = {};
|
||||
|
||||
Reference in New Issue
Block a user