# ivyforms/1.1/frontend/src/utils/contextMenu.ts

The Innovative Form Builder – IvyForms, version 1.1. 14 lines.

- Page: https://pluginprobe.com/plugins/ivyforms/1.1/code/frontend/src/utils/contextMenu.ts
- Raw: https://pluginprobe.com/plugins/ivyforms/1.1/raw/frontend/src/utils/contextMenu.ts
- Modified: 2026-06-08T12:18:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ivyforms/1.1/code/frontend/src/utils/contextMenu.ts#L10-L20`.

```typescript
import { useContextMenuStore } from '@/stores/contextMenuStore.ts'

export const withDelayedClose =
  (fn: () => unknown, delay = 500) =>
  async () => {
    try {
      await fn()
    } finally {
      setTimeout(() => {
        useContextMenuStore().closeContextMenu()
      }, delay)
    }
  }

```
