Improve code and its formatting

This commit is contained in:
Maximilian Krög
2021-10-19 22:07:33 +02:00
parent f2f9f68840
commit 5149224354
4 changed files with 37 additions and 53 deletions
+2 -4
View File
@@ -84,10 +84,8 @@ export const altShiftKeysOnly = function (mapBrowserEvent) {
*/
export const focus = function (event) {
const targetElement = event.map.getTargetElement();
return targetElement.contains(
/** @type {Document} */ (event.map.getOwnerDocument())
.activeElement
);
const activeElement = event.map.getOwnerDocument().activeElement;
return targetElement.contains(activeElement);
};
/**