Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Drag Meta keeps tracking drag after right click #717

Closed
tomdye opened this issue Oct 11, 2017 · 2 comments · Fixed by #719
Closed

Drag Meta keeps tracking drag after right click #717

tomdye opened this issue Oct 11, 2017 · 2 comments · Fixed by #719
Assignees
Milestone

Comments

@tomdye
Copy link
Member

tomdye commented Oct 11, 2017

Bug

Package Version: current

Expected behavior:

When you right click the mouse the drag meta should not track the drag as the pointer event is managed by the context menu at that point.

Actual behavior:

Drag meta treats the right mouse click as a drag and gets confused once the context menu has been closed continuing to drag the mouse movement until left mouse button is clicked.

@kitsonk kitsonk self-assigned this Oct 11, 2017
@kitsonk kitsonk added this to the 2017.10 milestone Oct 11, 2017
@kitsonk
Copy link
Member

kitsonk commented Oct 11, 2017

On the start of the drag, we currently do not inspect if it is a single finger or a left mouse button. That means if something is being tracked by the Drag meta manager, the Drag state for that node starts. Because we use the capture phase on subsequent move and mouse up events (to ensure that we get the the proper target on subsequent events), any other items created "block" those events from being attributed back to the target. Filtering only single finger/left clicks should solve this particular problem, but if we end up with other issues, we might want to change the drag manager to ensure only one virtual DOM element can be in a drag state and other pointer events not attributable to that DOM node kill the drag state.

@kitsonk
Copy link
Member

kitsonk commented Oct 11, 2017

The fix is the fix, but thinking more about what I also said about other fixes, those won't work. Once we enter a drag state, all subsequent events are attributed to that until the pointer up. It already ensures only one virtual DOM element can be in a drag state.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants