mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-1053: Unless overridden, default to "text" input mode if platform likely lacks a physical keyboard.
This commit is contained in:
		| @@ -58,7 +58,7 @@ angular.module('settings').factory('preferenceService', ['$injector', | ||||
|          * | ||||
|          * @type String | ||||
|          */ | ||||
|         inputMethod : 'none' | ||||
|         inputMethod : null | ||||
|  | ||||
|     }; | ||||
|  | ||||
| @@ -88,6 +88,17 @@ angular.module('settings').factory('preferenceService', ['$injector', | ||||
|     } | ||||
|     catch (ignore) {} | ||||
|  | ||||
|     // Choose reasonable default input method based on best-guess at platform | ||||
|     if (service.preferences.inputMethod === null) { | ||||
|  | ||||
|         // Use text input by default if platform likely lacks physical keyboard | ||||
|         if (/android|ipad|iphone/i.test(navigator.userAgent)) | ||||
|             service.preferences.inputMethod = 'text'; | ||||
|         else | ||||
|             service.preferences.inputMethod = 'none'; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     // Persist settings when window is unloaded | ||||
|     $window.addEventListener('unload', service.save); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user