Page 1 of 1

"Save Changes" needs to be clicked - even if change was reversed

Posted: September 21st, 2017, 4:07 am
by OneCD
Hello,

Now running my nice new SAB 2.3.0 and it's looking good so far. ;D

But noticed a small issue: if I'm on a config page - say 'Switches' - and tick a box, then untick that same box, the page seems to see this as a config change and throws the warning about "This page is asking you to confirm that you want to leave - data you have entered may not be saved" with the "Stay on Page" and "Leave Page" buttons available.

To prevent this, I need to click on a "Save Changes" button before leaving this page, even though I reversed my change.

I guess for the browser to recognise this, it would need to keep track of the state of every field on that page, then compare each one when attempting to leave that page. If the finished-state is the same as the load-state, then saving would not be required.

Thoughts?

Re: "Save Changes" needs to be clicked - even if change was reversed

Posted: September 21st, 2017, 4:22 am
by safihre
You are right, but that would involve either putting the original value in a html-attribute or save the initial state on page load with some JS magic.
If you want to implement that, it would be nice to have :) ;)

Re: "Save Changes" needs to be clicked - even if change was reversed

Posted: September 21st, 2017, 4:34 am
by OneCD
Afraid my web-dev skills are stuck back in the mid 1990's with static pages. ::)