@@ -78,9 +78,6 @@ export default function(ctx) {
7878 } ;
7979
8080 events . touchstart = function ( event ) {
81- if ( ! navigator . userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ) {
82- event . originalEvent . preventDefault ( ) ;
83- }
8481 if ( ! ctx . options . touchEnabled ) {
8582 return ;
8683 }
@@ -95,9 +92,6 @@ export default function(ctx) {
9592 } ;
9693
9794 events . touchmove = function ( event ) {
98- if ( ! navigator . userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ) {
99- event . originalEvent . preventDefault ( ) ;
100- }
10195 if ( ! ctx . options . touchEnabled ) {
10296 return ;
10397 }
@@ -107,9 +101,6 @@ export default function(ctx) {
107101 } ;
108102
109103 events . touchend = function ( event ) {
110- if ( ! navigator . userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ) {
111- event . originalEvent . preventDefault ( ) ;
112- }
113104 if ( ! ctx . options . touchEnabled ) {
114105 return ;
115106 }
@@ -228,9 +219,9 @@ export default function(ctx) {
228219 ctx . map . on ( 'mouseup' , events . mouseup ) ;
229220 ctx . map . on ( 'data' , events . data ) ;
230221
231- ctx . map . on ( 'touchmove' , events . touchmove ) ;
232- ctx . map . on ( 'touchstart' , events . touchstart ) ;
233- ctx . map . on ( 'touchend' , events . touchend ) ;
222+ ctx . map . on ( 'touchmove' , events . touchmove , { passive : true } ) ;
223+ ctx . map . on ( 'touchstart' , events . touchstart , { passive : true } ) ;
224+ ctx . map . on ( 'touchend' , events . touchend , { passive : true } ) ;
234225
235226 ctx . container . addEventListener ( 'mouseout' , events . mouseout ) ;
236227
0 commit comments