forked from MapComplete/MapComplete
		
	Enable context actions on input fields, partly fix of #204
This commit is contained in:
		
							parent
							
								
									6396492773
								
							
						
					
					
						commit
						1f0b20f5d4
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		
							
								
								
									
										6
									
								
								index.ts
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								index.ts
									
										
									
									
									
								
							| 
						 | 
					@ -143,6 +143,12 @@ if (layoutFromBase64.startsWith("http")) {
 | 
				
			||||||
        .SetStyle("pointer-events: all;")
 | 
					        .SetStyle("pointer-events: all;")
 | 
				
			||||||
        .AttachTo("topleft-tools");
 | 
					        .AttachTo("topleft-tools");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					// Remove all context event listeners on mobile to prevent long presses
 | 
				
			||||||
window.addEventListener('contextmenu', (e) => { // Not compatible with IE < 9
 | 
					window.addEventListener('contextmenu', (e) => { // Not compatible with IE < 9
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    if(e.target["nodeName"] === "INPUT"){
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    e.preventDefault();
 | 
					    e.preventDefault();
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
}, false);
 | 
					}, false);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue