We have moved to GitHub Issues
Created by Douglas Robar 14 May 2014, 10:36:01 Updated by Jose Marcenaro 01 Sep 2018, 23:23:01Tags: PR
Is duplicated by: U4-4988
Relates to: U4-6265
Relates to: U4-6515
Relates to: U4-7484
Relates to: U4-8143
Relates to: U4-9996
Relates to: CON-1438
Relates to: U4-10725
Subtask of: U4-9609
The "Discard changes" alert works when you move from one content page to another.
It should work when leaving an unsaved template, razor code, js, css, etc as well.
Some other issues about the "discard changes" feature:
If you change the media or content picker and you navigate away you don't get the "Discard changes" message. Might be other (custom) property editors that have the same problem.
If you navigate really fast between nodes you also get the "discard changes" message even if you didn't change anything.
Another issue: If you navigate away from content to another section and you click 'discard changes' it doesn't open the node in the other section, but only goes to that section with the default dashboards open.
Simply clicking in a rich text editor and the navigating away, without changing anything, will display the "discard changes" message.
"If you navigate really fast between nodes you also get the "discard changes" message even if you didn't change anything." This is still happening in Umbraco 7.4-beta2 and is still very annoying.
Indeed, we get far too many "discard changes" notices; for any nodes where "list view" is enabled, merely trying to pick a node from the list view brings up the Discard changes notice. And as mentioned by Matthew, sometimes just opening a node and not touching anything still brings up the Discard notice when navigating to another node. We're on 7.4.1
As already mentioned a bit, there are a few "false positives" around the Umbraco backoffice as well. This occurs in the list view and in dashboards - eg. playing around with the Examine dashboard will usually result in the "Discard changes" message when browsing away.
This feature is broken, triggers when it shouldn't too many times. I'm not sure if that's easily fixable or not, but I know I'd rather have it turned off than to annoy people.
It would be nice to have an option to disable "discard changes" completely. It's driving me crazy. Each time I search for a member and want to open it I get this message. It's a broken feature so I would like to disable it.
It indeed seems a bit broken, but I do understand the complications in implementing this correctly. Until time can be set aside to fix this in a thoroughly manner, perhaps an option to disable it, as Jeroen suggested, would be the best choice.
@jbreuer disabling the feature doesn't 'fix' the issue. The issue should just be fixed. It's probably rather easy, some text boxes just need to be attributed so that the change tracking is ignored. There's probably a few places in the back office that are just missing the "no-dirty-check" attribute (i.e searching for a member), for example: https://github.com/umbraco/Umbraco-CMS/blob/9badb35c054ecc91630b69b1b6753c78427cb4a6/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/examinemanagement.html#L217 Feel free to send a PR :)
PR created: https://github.com/umbraco/Umbraco-CMS/pull/2298
Please don't set issues to "Fixed", this is the job of the HQ once a PR is merged and then we tag it to a release. If you mark as fixed, it will get lost in the abyss since it will be considered already done.
I have found out that the culprit for the false-positives is how
no-dirty-check directive works. Before it used the focus event to set the ctrl.$pristine = false, which it didn't worked unless you manually focused on the input.
NOTE: *Setting directive priorities does not work *Only watching the element, model, ctrl does not work
Wonderfull! I have merged the PR which adds no-dirty-checks to a lot of places in the UI. Hopefully, this will help make the feature feel less broken. If we missed any feel free to open a new issue and PR.
Thanks @m.zajkowski for the great work!
That's a great news @madsrasmussen! I was using this custom build for some time already and I felt a change :)
The problem fro U4-9996, where the "discard changes" alert displays when it shouldn't when uploading files, still exists in v7.7.9.
Hey @bitmapped, thanks for your input - I can confirm the issue and we will be looking at it as soon as we can.
As said, we don't want to pretend that this covers all cases, but we can't keep this issue open forever, much better to have a few more related issues open so we can fix them one by one easily.
It looks like the "no check" fix went too far. The MultiTreeNodePicker2 is not setting the $dirty flag when adding items (it does when removing) - using v7.12.1
Type: Usability Problem
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.4.2, 7.5.14, 7.6.3
Due in version: 7.7.9
Sprint: Sprint 76
Story Points: 1