ol 10.0.1-dev.1724093928963 → 10.0.1-dev.1724094100697
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Map.d.ts +6 -0
- package/Map.d.ts.map +1 -1
- package/Map.js +27 -4
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/events/condition.d.ts.map +1 -1
- package/events/condition.js +11 -4
- package/package.json +1 -1
- package/util.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["condition.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH;;;;GAIG;AACH,2CAFY,SAAS,CAkBpB;AAUM,4CAJI,4CAAuC,GACtC,OAAO,CAYlB;AAUM,kDAJI,4CAAuC,GACtC,OAAO,CAYlB;AAUM,6BAJI,4CAAuC,GACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["condition.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH;;;;GAIG;AACH,2CAFY,SAAS,CAkBpB;AAUM,4CAJI,4CAAuC,GACtC,OAAO,CAYlB;AAUM,kDAJI,4CAAuC,GACtC,OAAO,CAYlB;AAUM,6BAJI,4CAAuC,GACtC,OAAO,CAWlB;AAQM,yCAHI,4CAAuC,GACtC,OAAO,CASlB;AAED;;;;;;GAMG;AACH,iCAA2B;AASpB,uCAJI,4CAAuC,GACtC,OAAO,CAKlB;AAWM,mDAHI,4CAAuC,GACtC,OAAO,CAOlB;AAED;;;;;;GAMG;AACH,iCAA2B;AAUpB,6CAJI,4CAAuC,GACtC,OAAO,CAKlB;AASM,6CAJI,4CAAuC,GACtC,OAAO,CAKlB;AASM,6CAJI,4CAAuC,GACtC,OAAO,CAKlB;AAUM,gDAJI,4CAAuC,GACtC,OAAO,CAYlB;AAWM,yDAJI,4CAAuC,GACtC,OAAO,CAYlB;AAUM,qDAJI,4CAAuC,GACtC,OAAO,CAQlB;AAUM,8CAJI,4CAAuC,GACtC,OAAO,CAYlB;AAWM,mDAJI,4CAAuC,GACtC,OAAO,CAiBlB;AASM,2CAJI,4CAAuC,GACtC,OAAO,CAalB;AASM,2CAJI,4CAAuC,GACtC,OAAO,CAalB;AASM,yCAJI,4CAAuC,GACtC,OAAO,CAalB;AAWM,+CAJI,4CAAuC,GACtC,OAAO,CAYlB;;;;;wBA7VY,CAAS,IAAO,EAAD,OAAC,EAAE,IAAuC,EAAvC,4CAAuC,KAAG,OAAO;qBARtD,iBAAiB;sBAAjB,iBAAiB"}
|
package/events/condition.js
CHANGED
|
@@ -84,8 +84,12 @@ export const altShiftKeysOnly = function (mapBrowserEvent) {
|
|
|
84
84
|
*/
|
|
85
85
|
export const focus = function (event) {
|
|
86
86
|
const targetElement = event.map.getTargetElement();
|
|
87
|
+
const rootNode = targetElement.getRootNode();
|
|
87
88
|
const activeElement = event.map.getOwnerDocument().activeElement;
|
|
88
|
-
|
|
89
|
+
|
|
90
|
+
return rootNode instanceof ShadowRoot
|
|
91
|
+
? rootNode.host.contains(activeElement)
|
|
92
|
+
: targetElement.contains(activeElement);
|
|
89
93
|
};
|
|
90
94
|
|
|
91
95
|
/**
|
|
@@ -95,9 +99,12 @@ export const focus = function (event) {
|
|
|
95
99
|
* @return {boolean} The map container has the focus or no 'tabindex' attribute.
|
|
96
100
|
*/
|
|
97
101
|
export const focusWithTabindex = function (event) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
const targetElement = event.map.getTargetElement();
|
|
103
|
+
const rootNode = targetElement.getRootNode();
|
|
104
|
+
const tabIndexCandidate =
|
|
105
|
+
rootNode instanceof ShadowRoot ? rootNode.host : targetElement;
|
|
106
|
+
|
|
107
|
+
return tabIndexCandidate.hasAttribute('tabindex') ? focus(event) : true;
|
|
101
108
|
};
|
|
102
109
|
|
|
103
110
|
/**
|
package/package.json
CHANGED
package/util.js
CHANGED