obsidian-kanban icon indicating copy to clipboard operation
obsidian-kanban copied to clipboard

Fixes scrolling on touch-enabled devices (#702)

Open theseanl opened this issue 1 year ago • 1 comments

Pointerdown events fire as soon as user touches the screen in order to initiate swipe gesture. If its default action isn't prevented, click event will anyway fire, so adding the same event listener to pointerdown event is redundant. So we remove it.

On the other hand, not suppressing pointerdown event allows dragstart events to fire on anchor nodes, which triggers browser's default action that is probably not what user have wanted (because this has never worked before), so we prevent via preventDefault() call.

This allows one to swipe normally and move cards around by dnd while touching anchor nodes.

theseanl avatar Jun 30 '23 20:06 theseanl

Thanks. Now the links do not open every time you move :) At the same time, they open when you click. I hope @mgmeyers will merge this PR sometime

DmitriySalnikov avatar Dec 04 '23 08:12 DmitriySalnikov

Brought this in in https://github.com/mgmeyers/obsidian-kanban/commit/bde928a6a9c4a67c8dbec1bf630220089ff2b823 as I've made some major changes recently that cause some conflicts. Thanks @theseanl

mgmeyers avatar Apr 18 '24 16:04 mgmeyers