Skip to content

Commit a47a4d4

Browse files
author
vvo
committed
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
1 parent c11e010 commit a47a4d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/autocomplete/typeahead.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function Typeahead(o) {
5959
// #351: preventDefault won't cancel blurs in ie <= 8
6060
$input.on('blur.aa', function($e) {
6161
var active = document.activeElement;
62-
if (_.isMsie() && ($menu.is(active) || $menu.has(active).length > 0)) {
62+
if (_.isMsie() && ($menu[0] === active || $menu[0].contains(active))) {
6363
$e.preventDefault();
6464
// stop immediate in order to prevent Input#_onBlur from
6565
// getting exectued

0 commit comments

Comments
 (0)