Skip to content

fix: prevent hotspot move on double-click and open edit modal#9

Merged
trmquang93 merged 1 commit intomainfrom
fix/hotspot-double-click-behavior
Mar 17, 2026
Merged

fix: prevent hotspot move on double-click and open edit modal#9
trmquang93 merged 1 commit intomainfrom
fix/hotspot-double-click-behavior

Conversation

@trmquang93
Copy link
Copy Markdown
Collaborator

Summary

  • Add a 5px drag threshold ("reposition-pending" state) to prevent accidental hotspot repositioning during double-click/double-tap
  • Double-clicking a hotspot now opens the HotspotModal edit dialog
  • Add ESC key support to close HotspotModal

Test plan

  • Single-click an unselected hotspot — should show purple highlight (selected)
  • Double-click a hotspot — should open the edit modal, hotspot should NOT move
  • Click a selected hotspot and drag beyond 5px — should reposition normally
  • Click a selected hotspot and release without dragging — should stay selected, no movement
  • Press ESC while HotspotModal is open — should close the modal
  • All existing tests pass (npm test — 233 tests)

Add drag threshold to hotspot reposition to prevent accidental moves
during double-click. Introduce "reposition-pending" intermediate state
that requires 5px mouse movement before committing to a drag.

Double-clicking a hotspot now opens the HotspotModal for editing.
Add ESC key support to close HotspotModal.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-forge Ready Ready Preview, Comment Mar 17, 2026 4:11pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant