Merge pull request #219 from MathieuLorber/input-in-shadowdom

ShadowDom form elements are considered for preventing scrolling by keyevent
This commit is contained in:
Hyunje Alex Jun 2014-10-14 01:46:03 +02:00
commit d4ec7fca6d

View File

@ -430,7 +430,16 @@
return; return;
} }
if (!hovered || $(document.activeElement).is(":input,[contenteditable]")) { if (!hovered) {
return;
}
var activeElement = document.activeElement;
// go deeper if element is a webcomponent
while (activeElement.shadowRoot) {
activeElement = activeElement.shadowRoot.activeElement;
}
if ($(activeElement).is(":input,[contenteditable]")) {
return; return;
} }