twigfiddle
twigfiddle copied to clipboard
Leaving the page should not ask for confirmation when there is no change
When the form is kept empty or when the fiddle has just been saved without any further changes, leaving the page should not ask for confirmation.
When it asked me after I saved the fiddle, it made me wonder whether saving was done or no.
This behavior should already be implemented. Do you have a more detailed reproduction case?
There may be some invisible state changes, like for example where you click on "Show compiled template", where a hidden checkbox is ticked to store the toggle state of the compiled template.
well, if this checkbox is hidden, it should not be included in the state being checked IMO, as it is confusing (and it is not a persisted state anyway)
Ok, will see that.
This toggle is a persisted state (on some SO questions, this is sometimes the only thing interesting in a fiddle)
Sample: https://twigfiddle.com/test/3
This toggle is a persisted state (on some SO questions, this is sometimes the only thing interesting in a fiddle)
The fact that it is a persistent state is something I was not aware of (and I guess it is a common case, as that's a hidden state). Maybe improving the confirmation message could fix it.