Update condition.js

This commit is contained in:
andrewcoder002
2021-10-19 12:55:04 +02:00
committed by Maximilian Krög
parent f353d52da3
commit f2f9f68840

View File

@@ -85,7 +85,7 @@ export const altShiftKeysOnly = function (mapBrowserEvent) {
export const focus = function (event) {
const targetElement = event.map.getTargetElement();
return targetElement.contains(
/** @type {Document} */ (targetElement.getRootNode({composed: true}))
/** @type {Document} */ (event.map.getOwnerDocument())
.activeElement
);
};