mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 04:42:09 +08:00 
			
		
		
		
	fix(NumberKeyboard): eliminate tap delay on safari (#6667)
* fix(NumberKeyboard): eliminate click delay on safari * chore: upd comment
This commit is contained in:
		
							parent
							
								
									32b74da530
								
							
						
					
					
						commit
						5b7265fa5f
					
				@ -193,6 +193,7 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // eliminate tap delay on safari
 | 
			
		||||
      preventDefault(event, stopPropagation);
 | 
			
		||||
 | 
			
		||||
      this.checkTap();
 | 
			
		||||
 | 
			
		||||
@ -45,8 +45,10 @@ export default createComponent({
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onTouchEnd() {
 | 
			
		||||
    onTouchEnd(event) {
 | 
			
		||||
      if (this.active) {
 | 
			
		||||
        // eliminate tap delay on safari
 | 
			
		||||
        event.preventDefault();
 | 
			
		||||
        this.active = false;
 | 
			
		||||
        this.$emit('press', this.text, this.type);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user