Skip to content

Commit

Permalink
Merge pull request #149 from algolia/fix/zepto-is-selector-only
Browse files Browse the repository at this point in the history
fix(zepto): .is() only accepts selectors, reworked code to use pure DOM
  • Loading branch information
vvo authored Jan 24, 2017
2 parents c11e010 + a47a4d4 commit d70ef46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autocomplete/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Typeahead(o) {
// #351: preventDefault won't cancel blurs in ie <= 8
$input.on('blur.aa', function($e) {
var active = document.activeElement;
if (_.isMsie() && ($menu.is(active) || $menu.has(active).length > 0)) {
if (_.isMsie() && ($menu[0] === active || $menu[0].contains(active))) {
$e.preventDefault();
// stop immediate in order to prevent Input#_onBlur from
// getting exectued
Expand Down

0 comments on commit d70ef46

Please sign in to comment.