aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/input.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/directive/input.js')
-rw-r--r--src/ng/directive/input.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index ea4d84f4..8307f7e8 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -449,15 +449,15 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
deferListener();
});
- // if user paste into input using mouse, we need "change" event to catch it
- element.on('change', listener);
-
// if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
if ($sniffer.hasEvent('paste')) {
element.on('paste cut', deferListener);
}
}
+ // if user paste into input using mouse on older browser
+ // or form autocomplete on newer browser, we need "change" event to catch it
+ element.on('change', listener);
ctrl.$render = function() {
element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);