Skip to content

fix(bar-ui): add click suppression on buttons if bar was dragged - #24

Merged
lxsmnsyc merged 1 commit into
solidjs:mainfrom
Xoppyc:fix/toolbar-drag-click
Oct 24, 2026
Merged

lxsmnsyc merged 1 commit into
solidjs:mainfrom
Xoppyc:fix/toolbar-drag-click

Conversation

@Xoppyc

@Xoppyc Xoppyc commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Previously, dragging the toolbar by holding down on an IconButton would trigger a click event on that button upon release, unintentionally opening or toggling a panel.

  • Track drag distance (isDragging) with a 4px threshold so normal clicks still function immediately while intentional drags are distinguished.
  • Add a capture-phase click event listener on handle that calls stopPropagation() and preventDefault() if a drag just occurred, swallowing the event before it reaches the child buttons.

Notes

I used pnpm format and for some reason previously L15-L17 were expanded by the formatter

@lxsmnsyc

Copy link
Copy Markdown
Member

merging this for now, it's still has value even if the dock change is upcoming.

@lxsmnsyc
lxsmnsyc merged commit 598c211 into solidjs:main Oct 24, 2026
3 checks passed
lxsmnsyc added a commit that referenced this pull request Oct 25, 2026
- Covers #22, the graph arrow fix, and #24, which merged without one.
- Lets the release workflow open the next Version Packages PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants