obsidian-kanban
obsidian-kanban copied to clipboard
Fixes scrolling on touch-enabled devices (#702)
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.
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
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