Available since v0.1.0
fs-trigger="dblclick"
StableFires on a native dblclick event. Use for UI patterns that genuinely require a double-click — inline-edit activation, select-and-open, open-details gestures.
Syntax
<li fs-assert="todos/enter-edit-mode" fs-trigger="dblclick"
fs-assert-visible=".todo-edit-input">
Write the docs
</li>
When to use it
- Inline edit activation on list items
- Open-details gestures where single-click has a different meaning
- Legacy desktop-style UI patterns ported to the web
For most web UI, a single click is the right choice. dblclick is niche.
Example
<li class="todo-item"
fs-assert="todos/enter-edit-mode"
fs-trigger="dblclick"
fs-assert-updated=".todo-item[data-mode=edit]">
Write the docs
</li>
Pairs well with
fs-assert-visible— reveal an edit inputfs-assert-updated— flip the element to edit mode
Gotchas
- Mobile and touch devices. Native
dblclickis unreliable on touch. If you support touch, prefer a long-press or a tap-to-edit pattern with a singleclick. - Timing. Browsers fire two
clickevents before thedblclick— if you also have aclickassertion on the same element, both will fire. Put the trigger on distinct elements or use different assertion keys.
See also
click— the single-click alternative- Triggers index