diff --git a/changelog.txt b/changelog.txt index 531af964..7a04e821 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ OPENSEADRAGON CHANGELOG 2.3.1: (In Progress) * Debug mode now uses different colors for different tiled images (customizable via debugGridColor) (#1271) +* Fixed a problem with preventDefaultAction for the canvas-drag event () 2.3.0: diff --git a/src/viewer.js b/src/viewer.js index 649456de..0921eca8 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2655,6 +2655,7 @@ function onCanvasDrag( event ) { originalEvent: event.originalEvent, preventDefaultAction: event.preventDefaultAction }; + /** * Raised when a mouse or touch drag operation occurs on the {@link OpenSeadragon.Viewer#canvas} element. * @@ -2674,7 +2675,7 @@ function onCanvasDrag( event ) { */ this.raiseEvent( 'canvas-drag', canvasDragEventArgs); - if ( !event.preventDefaultAction && this.viewport ) { + if ( !canvasDragEventArgs.preventDefaultAction && this.viewport ) { gestureSettings = this.gestureSettingsByDeviceType( event.pointerType ); if( !this.panHorizontal ){ event.delta.x = 0;