GUAC-1314: Remove is_mac flag

This commit is contained in:
Frode Langelo
2015-09-24 15:55:54 +00:00
parent 005d7897fb
commit ff255ce977

View File

@@ -38,13 +38,6 @@ Guacamole.Keyboard = function(element) {
*/ */
var guac_keyboard = this; var guac_keyboard = this;
/**
* Flag indicating whether the browser is running on Mac
*
* @type Boolean
*/
var is_mac = (navigator && navigator.platform && navigator.platform.match(/^mac/i));
/** /**
* Fired whenever the user presses a key with the element associated * Fired whenever the user presses a key with the element associated
* with this Guacamole.Keyboard in focus. * with this Guacamole.Keyboard in focus.
@@ -194,7 +187,8 @@ Guacamole.Keyboard = function(element) {
this.keysym = keysym_from_key_identifier(keyIdentifier, location, guac_keyboard.modifiers.shift); this.keysym = keysym_from_key_identifier(keyIdentifier, location, guac_keyboard.modifiers.shift);
// Determine whether default action for Alt+combinations must be prevented // Determine whether default action for Alt+combinations must be prevented
var prevent_alt = !guac_keyboard.modifiers.ctrl && !is_mac; var prevent_alt = !guac_keyboard.modifiers.ctrl
&& !(navigator && navigator.platform && navigator.platform.match(/^mac/i));
// Determine whether default action for Ctrl+combinations must be prevented // Determine whether default action for Ctrl+combinations must be prevented
var prevent_ctrl = !guac_keyboard.modifiers.alt; var prevent_ctrl = !guac_keyboard.modifiers.alt;