mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	Automatically reposition event target on focus in case browser automatically centers input fields.
This commit is contained in:
		| @@ -279,6 +279,15 @@ var GuacamoleUI = { | ||||
|     GuacamoleUI.buttons.touchShowKeyboard.ontouchstart =  | ||||
|     GuacamoleUI.buttons.touchShowKeyboard.onclick =  | ||||
|         function(e) { | ||||
|  | ||||
|             // Center event target in case browser automatically centers | ||||
|             // input fields on focus. | ||||
|             GuacamoleUI.eventTarget.style.left = | ||||
|                 (window.pageXOffset + GuacamoleUI.viewport.offsetWidth / 2) + "px"; | ||||
|  | ||||
|             GuacamoleUI.eventTarget.style.top = | ||||
|                 (window.pageYOffset + GuacamoleUI.viewport.offsetHeight / 2) + "px"; | ||||
|  | ||||
|             GuacamoleUI.eventTarget.focus(); | ||||
|             GuacamoleUI.hideTouchMenu(); | ||||
|             e.preventDefault(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user