mirror of
				https://github.com/mdbootstrap/mdb-ui-kit.git
				synced 2025-10-30 23:47:42 +03:00 
			
		
		
		
	Ignore invalid key codes for isChar
This commit is contained in:
		
							parent
							
								
									cb3096e0da
								
							
						
					
					
						commit
						c8d72dccce
					
				|  | @ -14,7 +14,16 @@ | |||
|     if (typeof evt.which == "undefined") { | ||||
|       return true; | ||||
|     } else if (typeof evt.which == "number" && evt.which > 0) { | ||||
|       return !evt.ctrlKey && !evt.metaKey && !evt.altKey && evt.which != 8 && evt.which != 9; | ||||
|       return !evt.ctrlKey | ||||
|         && !evt.metaKey | ||||
|         && !evt.altKey | ||||
|         && evt.which != 8  // backspace
 | ||||
|         && evt.which != 9  // tab
 | ||||
|         && evt.which != 13 // enter
 | ||||
|         && evt.which != 16 // shift
 | ||||
|         && evt.which != 17 // ctrl
 | ||||
|         && evt.which != 20 // caps lock
 | ||||
|         && evt.which != 27; // escape
 | ||||
|     } | ||||
|     return false; | ||||
|   } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user