Re-enable onFocusOnly option for interaction defaults
This commit is contained in:
@@ -59,6 +59,18 @@ export const focus = function (event) {
|
||||
return event.target.getTargetElement().contains(document.activeElement);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return `true` if the map has the focus or no 'tabindex' attribute set.
|
||||
*
|
||||
* @param {import("../MapBrowserEvent.js").default} event Map browser event.
|
||||
* @return {boolean} The map container has the focus or no 'tabindex' attribute.
|
||||
*/
|
||||
export const focusWithTabindex = function (event) {
|
||||
return event.map.getTargetElement().hasAttribute('tabindex')
|
||||
? focus(event)
|
||||
: true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return always true.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user