antvis/G6

The issue has been closed
"contextmenu" event strange behavior in Chrome/Safari on OSX M1 (not Firefox) #4221
pl7y posted onGitHub
Describe the bug
When you right-click on a node, the system context menu opens correctly; when you click outside to discard the context menu and move the mouse, the mouse starts dragging around the node on which you initially opened the context menu.
Your Example Website or App
https://g6.antv.antgroup.com/en/examples/net/radialLayout#interactRadial and the older https://antv-g6.gitee.io/en/examples/net/radialLayout#interactRadial
Steps to Reproduce the Bug or Issue
- Open official G6 examples;
- Go to "Interactively Expand a Node" example; in this sample, you can select nodes with a click and drag them keeping the left button down and moving the mouse;
- Right click on a node and watch the browser context menu open;
- Click somewhere else on the graph and watch the browser context menu close;
- Now mouse interaction with the graph is corrupted: moving the mouse causes the node to be dragged around even if no mouse button is pressed; if you single click another node, you don't select it but instead you start dragging it even if no mouse button is pressed; If you double click the graph, the mouse behavior sometimes appears to reset and graph starts behaving like in bullet 2, but things may start to behave weirdly (e.g. more than one node can have the selected status, a thing that doesn't happen in the initial condition of bullet 2).
Expected behavior
As a user, I expected that opening the context menu doesn't corrupt mouse interaction with the graph (i.e. that you can continue to select nodes with a click and drag them keeping the left button down and moving the mouse).
Screenshots or Videos
Platform
- OS: macOS Ventura 13.1 (22C65)
- Browser: Chrome Version 108.0.5359.124 (Official build) (arm64), Chrome 109.0.5414.119 (Official build) (arm64), Safari Version 16.2 (18614.3.7.1.5)
- Version: 4.3.2, 4.8.5
Additional context
No response