mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUAC-882: Use window.open("") to check for existing window, not window.open(null).
This commit is contained in:
@@ -146,13 +146,17 @@ GuacUI.openObject = function(id, parameters) {
|
|||||||
if (parameters)
|
if (parameters)
|
||||||
url += "&" + parameters;
|
url += "&" + parameters;
|
||||||
|
|
||||||
// Attempt to focus existing window
|
// Attempt to pull existing window
|
||||||
var current = window.open(null, id);
|
var current = window.open("", id);
|
||||||
|
|
||||||
// If window did not already exist, set up as
|
// If window did not already exist, set up as
|
||||||
// Guacamole client
|
// Guacamole client
|
||||||
if (!current.GuacUI)
|
if (!current || !current.GuacUI)
|
||||||
window.open(url, id);
|
current = window.open(url, id);
|
||||||
|
|
||||||
|
// Focus (possibly) existing window
|
||||||
|
if (current)
|
||||||
|
current.focus();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user