reka-ui
Version:
Vue port for Radix UI Primitives.
16 lines (13 loc) • 445 B
JavaScript
;
function getActiveElement() {
let activeElement = document.activeElement;
if (activeElement == null) {
return null;
}
while (activeElement != null && activeElement.shadowRoot != null && activeElement.shadowRoot.activeElement != null) {
activeElement = activeElement.shadowRoot.activeElement;
}
return activeElement;
}
exports.getActiveElement = getActiveElement;
//# sourceMappingURL=getActiveElement.cjs.map