MCPcopy Create free account
hub / github.com/UI5/webcomponents / fixSafariActiveState

Function fixSafariActiveState

packages/base/src/util/fixSafariActiveState.ts:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3let listenerAttached = false;
4
5const fixSafariActiveState = () => {
6 if (isSafari() && isIOS() && !listenerAttached) {
7 // Safari on iOS does not use the :active state unless there is a touchstart event handler on the <body> element
8 document.body.addEventListener("touchstart", () => {});
9 listenerAttached = true;
10 }
11};
12
13export default fixSafariActiveState;

Callers 1

bootExecutorFunction · 0.85

Calls 2

isSafariFunction · 0.85
isIOSFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…