MCPcopy Create free account
hub / github.com/adobe/react-spectrum / fixSafariTransform

Function fixSafariTransform

packages/@react-spectrum/s2/src/Toast.tsx:639–648  ·  view source on GitHub ↗
(el: HTMLDivElement | null)

Source from the content-addressed store, hash-verified

637}
638
639function fixSafariTransform(el: HTMLDivElement | null) {
640 // WebKit has a bug where the toasts display in the wrong position (CSS transform is not applied correctly).
641 // Work around this by removing it, forcing a reflow, and re-applying.
642 if (el && isWebKit()) {
643 let translate = el.style.translate;
644 el.style.translate = '';
645 el.offsetHeight;
646 el.style.translate = translate;
647 }
648}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected