-
Notifications
You must be signed in to change notification settings - Fork 374
[fix] do not drag on right-click + fix refs #5784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎭 Playwright Test Results⏰ Completed at: 09/26/2025, 12:59:58 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
let mockNodeData: VueNodeData | ||
let mockOnPointerUp: ReturnType<typeof vi.fn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep these local to each it()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you could have them be const and resetAllMocks()
would take care of the state for you.
await nextTick() | ||
|
||
pointerHandlers.onPointerup(createPointerEvent('pointerup')) | ||
await nextTick() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will remove the ticks.
isDragging.value = false | ||
layoutStore.isDraggingVueNodes.value = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to eliminate the local isDragging and always use layoutStore as the source of truth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against this but it's not a trivial refactor... I could easily end up spending a day or two on it and that's exactly what we don't want me doing.
## Summary Fixes drag handling logic. ## Changes Only check for drag on left-click. Adds handler logic for following pointer events: 1. drag termination 2. context menu 3. pointer cancel Adds tests. Consolidates cleanup tasks. ## Screenshots Fixed State: Ignore first failed drag, browser window didn't have context. https://github.com/user-attachments/assets/00ec685a-1ef7-4102-b19b-4cdb9b201d22 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5784-fix-do-not-drag-on-right-click-fix-refs-27a6d73d3650812ea797fccf14022568) by [Unito](https://www.unito.io)
Summary
Fixes drag handling logic.
Changes
Only check for drag on left-click.
Adds handler logic for following pointer events:
Adds tests.
Consolidates cleanup tasks.
Screenshots
Fixed State:
Ignore first failed drag, browser window didn't have context.
Fix-Dragging-2025-09-25.mov
┆Issue is synchronized with this Notion page by Unito