mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	fix(Swipe): should prevent touchmove event when swiping (#9918)
This commit is contained in:
		
							parent
							
								
									d0260cf990
								
							
						
					
					
						commit
						102a3e4b4e
					
				| @ -210,8 +210,16 @@ export default createComponent({ | |||||||
| 
 | 
 | ||||||
|       this.touchMove(event); |       this.touchMove(event); | ||||||
| 
 | 
 | ||||||
|       if (this.isCorrectDirection) { |       // if user starting to touchmove, prevent the event bubbling to
 | ||||||
|  |       // avoid affecting the parent components
 | ||||||
|  |       const shouldPrevent = | ||||||
|  |         this.isCorrectDirection || | ||||||
|  |         this.offsetY > this.offsetX === this.vertical; | ||||||
|  |       if (shouldPrevent) { | ||||||
|         preventDefault(event, this.stopPropagation); |         preventDefault(event, this.stopPropagation); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       if (this.isCorrectDirection) { | ||||||
|         this.move({ offset: this.delta }); |         this.move({ offset: this.delta }); | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user