aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ng/directive/input.js3
-rw-r--r--src/ng/sniffer.js5
2 files changed, 7 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 {
diff --git a/src/ng/sniffer.js b/src/ng/sniffer.js
index 5389dc86..b19e7ccf 100644
--- a/src/ng/sniffer.js
+++ b/src/ng/sniffer.js
@@ -22,6 +22,11 @@ function $SnifferProvider() {
// IE8 compatible mode lies
(!$window.document.documentMode || $window.document.documentMode > 7),
hasEvent: function(event) {
+ // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
+ // it. In particular the event is not fired when backspace or delete key are pressed or
+ // when cut operation is performed.
+ if (event == 'input' && msie == 9) return false;
+
if (isUndefined(eventSupport[event])) {
var divElm = $window.document.createElement('div');
eventSupport[event] = 'on' + event in divElm;