Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix Node.contains bug in Firefox
Browse files Browse the repository at this point in the history
On Firefox there is anonymous div's inside input elements.
Explanation here: https://bugzilla.mozilla.org/show_bug.cgi?id=208427.

Fixes gh-193
Closes gh-215
  • Loading branch information
mmariano authored and scottgonzalez committed Sep 24, 2015
1 parent fca3119 commit 589bd3f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ var dispatcher = {
}
},
contains: /*scope.external.contains || */function(container, contained) {
return container.contains(contained);
try {
return container.contains(contained);
} catch(ex) {
// most likely: https://bugzilla.mozilla.org/show_bug.cgi?id=208427
return false;
}
},

// EVENTS
Expand Down

0 comments on commit 589bd3f

Please sign in to comment.