antvis/G6

"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

  1. Open official G6 examples;
  2. 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;
  3. Right click on a node and watch the browser context menu open;
  4. Click somewhere else on the graph and watch the browser context menu close;
  5. 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

https://user-images.githubusercontent.com/10465876/214839219-cb14a612-8788-456f-b2de-a17e013d4a02.mov

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


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 11 months ago

Fund this Issue

$0.00
Funded

Pull requests