aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/input.js
diff options
context:
space:
mode:
authorIgor Minar2012-05-06 09:27:10 -0700
committerIgor Minar2012-05-06 23:01:33 -0700
commit49dfdf8f0238ef8c473fcb44694f6b5696ecde70 (patch)
treedb9e407863a264356d52172e089159bb5fb647a1 /src/ng/directive/input.js
parent5bcb749abb91dba0847cb9bc900777a67fd55aa8 (diff)
downloadangular.js-49dfdf8f0238ef8c473fcb44694f6b5696ecde70.tar.bz2
fix(ngModel): use keydown/change events on IE9 instead of input
On IE9 the input event is not fired when backspace or delete key are pressed or when cut is performed. This makes listening on the input event unreliable and therefore it's better for us to just use keydown/change events instead. Closes #879
Diffstat (limited to 'src/ng/directive/input.js')
-rw-r--r--src/ng/directive/input.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index dadf07c4..6e394afd 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -379,7 +379,8 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
}
};
- // if the browser does support "input" event, we are fine
+ // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
+ // input event on backspace, delete or cut
if ($sniffer.hasEvent('input')) {
element.bind('input', listener);
} else {