Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul de Quant 403 posts 1520 karma points
    May 04, 2018 @ 12:49
    Paul de Quant
    0

    You have unsaved changes prompt

    Hello,

    We have in our Umbraco 7.10.0 CMS a re-occurring prompt telling us -

    You have unsaved changes

    with the options disregard or stay.

    The issue we have is that no changes have been made to the page, yet as we click on different pages in the site tree it keeps asking us preventing us from leaving the page we're on.

    Does anyone else get this and what exactly triggers this?

    Thanks

    Paul

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    May 08, 2018 @ 08:33
    Dennis Aaen
    0

    Hi Paul,

    I can see this has been fixed by a PR in the one of the earlier versions of Umbraco. See http://issues.umbraco.org/issue/U4-7484

    Since you are still see this in 7.10.0 feel free to open a new issue on this.

    The PR for this can be found here. https://github.com/umbraco/Umbraco-CMS/pull/2476

    /Dennis

  • Paul de Quant 403 posts 1520 karma points
    May 08, 2018 @ 08:41
    Paul de Quant
    0

    HI Dennis,

    Thanks for replying - I've just created a new issue now.

    Hopefully someone will take a look soon.

    Paul

  • Paul de Quant 403 posts 1520 karma points
    May 08, 2018 @ 08:49
    Paul de Quant
    0

    Also to check:- This was the check in 7.10

        function noDirtyCheck() {
        return {
            restrict: 'A',
            require: 'ngModel',
            link: function (scope, elm, attrs, ctrl) {
                var alwaysFalse = {
                    get: function () {
                        return false;
                    },
                    set: function () {
                    }
                };
                Object.defineProperty(ctrl, '$pristine', alwaysFalse);
                Object.defineProperty(ctrl, '$dirty', alwaysFalse);
            }
        };
    }
    

    And this was the previous check from the PR you referred to:-

    function noDirtyCheck() {
    return {
        restrict: 'A',
        require: 'ngModel',
        link: function (scope, elm, attrs, ctrl) {
    
            elm.focus(function () {
                scope.$watch(function() {
                    ctrl.$pristine = false;
                });
            });
    
    
        }
    };
    

    }

    Is it safe to replace one with the other?

Please Sign in or register to post replies

Write your reply to:

Draft