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

Control-click messes up facets dive selection #219

Open
rmcloughlin opened this issue Jun 10, 2020 · 4 comments
Open

Control-click messes up facets dive selection #219

rmcloughlin opened this issue Jun 10, 2020 · 4 comments

Comments

@rmcloughlin
Copy link

If you hold down the control key and click somewhere main visualization area then after that you won't be able to select an individual square.

Try it here, for example:
https://pair-code.github.io/facets/quickdraw.html

@jameswex
Copy link
Contributor

@jimbojw facets dive selection issue/question

@jimbojw
Copy link
Contributor

jimbojw commented Sep 18, 2020

Thanks for reporting this, which OS/browser are you using?

@rmcloughlin
Copy link
Author

Chrome 85.0.4183.102
Mac OS 10.15.6

@jimbojw
Copy link
Contributor

jimbojw commented Sep 21, 2020

Thanks, confirmed. I'm not sure what causes this. On a Mac, control-click brings up the same menu as right-click (clicking with two fingers on the touchpad). But right-clicking does not exhibit this behavior.

I suspect that the cause has to do with the D3 zoom behavior. After control-click, the browser's context menu appears. When you press Escape, the context menu disappears, but the app remains in a dragging state (if you move the mouse, the visualization pans). After you click again, the app stops dragging, but click events no longer seem to be bubbling to the visualization's handler (can't select sprites).

I'm guessing that a solution would be to capture control-mousedown and/or control-click events on Mac and prevent them from propagating to the D3 zoom behavior.

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

No branches or pull requests

3 participants