Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

blurHandler #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,14 @@ angular.module('ui.mask', [])
if (!isValid || value.length === 0) {
valueMasked = '';
iElement.val('');
scope.$apply(function() {
//only $setViewValue when not $pristine to avoid changing $pristine state.
if (!controller.$pristine) {
controller.$setViewValue('');
}
});
if (!scope.$$phase) {
scope.$apply(function() {
//only $setViewValue when not $pristine to avoid changing $pristine state.
if (!controller.$pristine) {
controller.$setViewValue('');
}
});
}
}
}
//Check for different value and trigger change.
Expand Down