plot icon indicating copy to clipboard operation
plot copied to clipboard

the pointer interaction breaks on mobile when you drag vertically

Open Fil opened this issue 1 year ago • 2 comments
trafficstars

On mobile, pointing (with Plot.pointer) works if you tap on a point, and it also works if you touch and drag horizontally. But as soon as you drag 1 pixel vertically (or sideways), the page scrolls up/down, and the pointer interaction stops.

Not sure if this is a 100% correct description. Tested in an observable notebook (I'd want to try and replicate it on a framework page).

Fil avatar Aug 30 '24 17:08 Fil

Not sure we want to change this; doing so would presumably prevent vertical scrolling if that is what you intended by touching and dragging and simply happened to touch the chart to start. We don’t want to create “dead areas” where you can’t scroll because the chart is stealing the input.

mbostock avatar Aug 30 '24 19:08 mbostock

Yes that's an important design constraint. But it still feels slightly broken as is, when I compare against this smooth chart. In the NYT chart dragging does not break the interaction, and at the same time does not create a dead zone.

Fil avatar Aug 30 '24 20:08 Fil