ContextmenuRootForSafariCompatibility.svelte

Declarations
#

view source

ContextmenuRootForSafariCompatibility
#

ContextmenuRootForSafariCompatibility.svelte view source

Blocks the next click event. Set to true when a longpress completes to prevent iOS's synthesized click from activating the first menu item.

contextmenu?

The contextmenu prop is not reactive because that's a rare corner case and it's easier to put the contextmenu directly in the context rather than wrapping with a store or other reactivity. If you need to change the contextmenu prop for some reason, use a {#key contextmenu} block: https://svelte.dev/docs#template-syntax-key

optional

longpress_move_tolerance?

The number of pixels the pointer can be moved without canceling longpress.

type number
optional

longpress_duration?

The number of milliseconds after a touch starts before opening the Fuz contextmenu.

type number
optional

bypass_with_tap_then_longpress?

Whether to detect tap-then-longpress to bypass the Fuz contextmenu. This allows access to the system contextmenu by tapping once then long-pressing. Setting to false disables the gesture.

type boolean
optional

bypass_window?

The number of milliseconds between taps to detect a gesture that bypasses the Fuz contextmenu. Used only when bypass_with_tap_then_longpress is true. If the duration is too long, it'll detect more false positives and interrupt normal usage, but too short and some people will have difficulty performing the gesture.

type number
optional

bypass_move_tolerance?

The number of pixels the pointer can be moved between taps to detect a tap-then-longpress. Used only when bypass_with_tap_then_longpress is true.

type number
optional

open_offset_x?

The number of pixels to offset from the pointer X position when opened. Useful to ensure the first menu item is immediately under the pointer.

type number
optional

open_offset_y?

The number of pixels to offset from the pointer Y position when opened. Useful to ensure the first menu item is immediately under the pointer.

type number
optional

scoped?

If true, wraps children with a div and listens to events on it instead of the window.

type boolean
optional

link_entry?

Snippet for rendering link entries. Set to null to disable automatic link detection. Defaults to link_entry_default which renders ContextmenuLinkEntry.

type Snippet<[ComponentProps<typeof ContextmenuLinkEntry>]> | null
optional

text_entry?

Snippet for rendering copy text entries. Set to null to disable automatic copy text detection. Defaults to text_entry_default which renders ContextmenuTextEntry.

type Snippet<[ComponentProps<typeof ContextmenuTextEntry>]> | null
optional

separator_entry?

Snippet for rendering separator entries. Set to null to disable automatic separator rendering. Defaults to separator_entry_default which renders ContextmenuSeparator.

type Snippet<[ComponentProps<typeof ContextmenuSeparator>]> | null
optional

children

type Snippet

Depends on
#