Start UI and connection only after control returns from body onload (otherwise, browser will always thing page is loading).

This commit is contained in:
Michael Jumper
2012-01-24 23:43:19 -08:00
parent 0752436d4a
commit ff12dcd416

View File

@@ -26,6 +26,7 @@
<link rel="stylesheet" type="text/css" href="styles/client.css"/> <link rel="stylesheet" type="text/css" href="styles/client.css"/>
<link rel="stylesheet" type="text/css" href="styles/keyboard.css"/> <link rel="stylesheet" type="text/css" href="styles/keyboard.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>Guacamole ${project.version}</title> <title>Guacamole ${project.version}</title>
</head> </head>
@@ -95,6 +96,11 @@
<!-- Init --> <!-- Init -->
<script type="text/javascript"> /* <![CDATA[ */ <script type="text/javascript"> /* <![CDATA[ */
// Start connect after control returns from onload (allow browser
// to consider the page loaded).
document.body.onload = function() {
window.setTimeout(function() {
// Instantiate client // Instantiate client
var guac = new Guacamole.Client( var guac = new Guacamole.Client(
GuacamoleUI.display, GuacamoleUI.display,
@@ -116,6 +122,9 @@
catch (e) { catch (e) {
GuacamoleUI.showError(e.message); GuacamoleUI.showError(e.message);
} }
}, 0);
};
/* ]]> */ </script> /* ]]> */ </script>