()
| 5 | import { getFocusableElements } from "./utils"; |
| 6 | |
| 7 | export function requireRefresh() { |
| 8 | const resizeTimeout = getState("__resizeTimeout"); |
| 9 | if (resizeTimeout) { |
| 10 | window.cancelAnimationFrame(resizeTimeout); |
| 11 | } |
| 12 | |
| 13 | setState("__resizeTimeout", window.requestAnimationFrame(refreshActiveHighlight)); |
| 14 | } |
| 15 | |
| 16 | function trapFocus(e: KeyboardEvent) { |
| 17 | const isActivated = getState("isInitialized"); |