Always prevent default after handleDragEvent

This commit is contained in:
Andreas Hocevar
2020-04-17 22:47:09 +02:00
parent 12043e147c
commit 51194c69eb
2 changed files with 3 additions and 2 deletions

View File

@@ -138,6 +138,8 @@ class PointerInteraction extends Interaction {
if (this.handlingDownUpSequence) {
if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {
this.handleDragEvent(mapBrowserEvent);
// prevent page scrolling during dragging
mapBrowserEvent.preventDefault();
} else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {
const handledUp = this.handleUpEvent(mapBrowserEvent);
this.handlingDownUpSequence =