MCPcopy Create free account
hub / github.com/dailydotdev/apps / syncInert

Function syncInert

packages/shared/src/components/drawers/Drawer.tsx:82–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80const openPanels: HTMLElement[] = [];
81let undoInert: () => void = () => undefined;
82const syncInert = () => {
83 undoInert();
84 undoInert = openPanels.length
85 ? inertOthers([
86 ...openPanels,
87 ...Array.from(
88 document.querySelectorAll<HTMLElement>('[data-inert-exempt]'),
89 ),
90 ])
91 : () => undefined;
92};
93
94const FOCUSABLE_SELECTOR =
95 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';

Callers 1

BaseDrawerFunction · 0.85

Calls 1

undoInertFunction · 0.85

Tested by

no test coverage detected