Skip to content

Fix channel drag-and-drop reliability and crosshair highlight - #1654

Open
SkyJoshua wants to merge 1 commit into
version/0.8.0from
fix/channel-drag
Open

Fix channel drag-and-drop reliability and crosshair highlight#1654
SkyJoshua wants to merge 1 commit into
version/0.8.0from
fix/channel-drag

Conversation

@SkyJoshua

Copy link
Copy Markdown
Contributor

Summary

  • draggable on channel/favorite rows was bound directly to a bare bool. Blazor renders that using its "boolean HTML attribute" convention, which isn't a value the browser recognizes for draggable (a true/false enumerated attribute, not a real toggle attribute) — so the row often just wasn't draggable at all. Now renders an explicit "true"/"false" string.
  • Dropping a channel onto the window-split crosshair never highlighted the target arrow, unlike tab dragging. Root cause: the coordinates on the relayed @ondrag event don't track the actual cursor position for native drags, so the existing scanner never found the real hovered target. Added a native dragover listener (capture phase, since the crosshair's own handler stops propagation) that tracks the real hovered element instead.
  • Channel drag-end now finalizes onto whatever crosshair target was last highlighted, matching how tab dragging resolves its drop, instead of relying on a pixel-perfect release.

You're welcome @jadennaut :P

Test plan

  • Drag channels and categories within the sidebar tree, including the last item in a list
  • Drag a channel onto the window-split crosshair and confirm the target arrow highlights
  • Drop a channel on a crosshair arrow and confirm it opens in that split direction

draggable was bound to a bare bool, which Blazor renders in a way the
browser doesn't recognize as a valid draggable state. Also fixes the
window-split crosshair not highlighting during a channel drag by
watching real dragover events instead of the drag event's coordinates,
which don't track the cursor.
@SkyJoshua
SkyJoshua requested a review from a team as a code owner August 2, 2026 15:56

@SigmaTel71 SigmaTel71 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I am okay with the code.
I'm still thinking why TypeScript compilation artifacts are in the repo (.razor.js and .razor.js.map files) but it is out of scope of this PR. That's something I'll ask SpikeViper later in the chat.

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