Skip to content

Commit

Permalink
IE fix: jquery.validate has a patch that adds focus events everywhere
Browse files Browse the repository at this point in the history
This excludes Topbar since it's React component and it's life cycle
is different from what jQuery assumes and therefore causes problems
in IE
  • Loading branch information
Gnito committed Aug 24, 2016
1 parent 1b128f1 commit 324833f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vendor/assets/javascripts/jquery.validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1225,10 +1225,14 @@ $.format = $.validator.format;
}, function( original, fix ){
$.event.special[fix] = {
setup:function() {
this.addEventListener( original, handler, true );
if ($(this).parents('.Topbar')[0] != null) {
this.addEventListener( original, handler, true );
}
},
teardown:function() {
this.removeEventListener( original, handler, true );
if ($(this).parents('.Topbar')[0] != null) {
this.removeEventListener( original, handler, true );
}
},
handler: function(e) {
var args = arguments;
Expand Down

0 comments on commit 324833f

Please sign in to comment.