Browse Source

Ignore bogus events on IE (fixes #1040)

Ludovic Perrine 11 years ago
parent
commit
370299c425
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/js/bootstrapValidator.js

+ 5 - 1
src/js/bootstrapValidator.js

@@ -449,7 +449,11 @@ if (typeof jQuery === 'undefined') {
                 case 'enabled':
                 /* falls through */
                 default:
-                    fields.off(events).on(events, function() {
+                    fields.off(events).on(events, function(e) {
+                        // ignore bogus input events on IE
+                        if ('input' === e.type && document.activeElement !== this) {
+                            return;
+                        }
                         if (that._exceedThreshold($(this))) {
                             that.validateField($(this));
                         }