(function () { 'use strict'; var app = angular.module('sysMgrApp'); app.directive('noDirtyCheck', [function () { // Interacting with input elements having this directive won't cause the // form to be marked dirty. // http://stackoverflow.com/questions/17089090/prevent-input-from-setting-form-dirty-angularjs return { restrict: 'A', require: ['^form', '^ngModel'], link: function (scope, element, attrs, controllers) { var form = controllers[0]; var currentControl = controllers[1]; var formDirtyState = false; var manualFocus = false; element.bind('focus',function () { manualFocus = true; if (form) { window.console && console.log('Saving current form ' + form.$name + ' dirty status: ' + form.$dirty); formDirtyState = form.$dirty; // save form's dirty state } }); element.bind('blur', function () { if (currentControl) { window.console && console.log('Resetting current control ' + currentControl.$name + ' dirty status to false (called from blur)'); currentControl.$dirty = false; // Remove dirty state but keep the value if (!formDirtyState && form && manualFocus) form.$setPristine(); manualFocus = false; // scope.$apply(); } }); } }; }]); })();I've been testing and it seems to now work OK in that invoices edit form that prompted me looking into the issue. The first level form (Accounts Edit) do not seem to show any prompts right now, though. And this is even if I don't go to the tabs that have this noDirtyCheck directive so I think this is a separate problem.