提交 1e92db51 编写于 作者: A Aaron Job

updated with suggestions from @RubaXa

上级 b3c6d8b7
......@@ -262,18 +262,9 @@
type = evt.type,
touch = evt.touches && evt.touches[0],
target = (touch || evt).target,
originalTarget = evt.target.shadowRoot && evt.path[0] || target,
filter = options.filter;
var originalTarget;
if (evt.target.shadowRoot !== null)
{
originalTarget = evt.path[0];
}
else
{
originalTarget = target;
}
if (type === 'mousedown' && evt.button !== 0 || options.disabled) {
return; // only left button or enabled
}
......@@ -1010,17 +1001,8 @@
) {
return el;
}
if ('host' in el)
{
el = el.host;
}
else
{
el = el.parentNode;
}
}
while (el !== ctx && el);
while (el = ('host' in el) ? el.host : el.parentNode)
}
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册