facets icon indicating copy to clipboard operation
facets copied to clipboard

Control-click messes up facets dive selection

Open rmcloughlin opened this issue 4 years ago • 4 comments

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

rmcloughlin avatar Jun 10 '20 14:06 rmcloughlin

@jimbojw facets dive selection issue/question

jameswex avatar Jun 10 '20 15:06 jameswex

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

jimbojw avatar Sep 18 '20 20:09 jimbojw

Chrome 85.0.4183.102 Mac OS 10.15.6

rmcloughlin avatar Sep 18 '20 23:09 rmcloughlin

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.

jimbojw avatar Sep 21 '20 10:09 jimbojw