From a47a4d4c594de942404b5c7b9742e75551a1bec4 Mon Sep 17 00:00:00 2001 From: vvo Date: Mon, 23 Jan 2017 15:26:39 +0100 Subject: [PATCH] fix(zepto): .is() only accepts selectors, reworked code to use pure DOM Zepto's .is only support selectors, not dom nodes: http://zeptojs.com/#is DOMElement.contains() works on all browsers (IE5). fixes #144 --- src/autocomplete/typeahead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autocomplete/typeahead.js b/src/autocomplete/typeahead.js index c8577393b..c68f12fe1 100644 --- a/src/autocomplete/typeahead.js +++ b/src/autocomplete/typeahead.js @@ -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