ShadowDom form elements are considered for preventing scrolling by keyevent

This commit is contained in:
Mathieu Lorber 2014-10-01 11:49:16 +02:00
parent abab1e47a4
commit a573d2cd9d

View File

@ -431,7 +431,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;
} }