| Index: remoting/webapp/me2mom/remoting_session.js
|
| diff --git a/remoting/webapp/me2mom/remoting_session.js b/remoting/webapp/me2mom/remoting_session.js
|
| index 556d869f358fea3cf92d0bff2adc081d07eba647..cc438089ebcf477ce77f78701e6dc107ab629898 100644
|
| --- a/remoting/webapp/me2mom/remoting_session.js
|
| +++ b/remoting/webapp/me2mom/remoting_session.js
|
| @@ -24,6 +24,7 @@ remoting.httpXmppProxy =
|
| 'https://chromoting-httpxmpp-oauth2-dev.corp.google.com';
|
|
|
| window.addEventListener("load", init_, false);
|
| +window.addEventListener('blur', pluginLostFocus_, false);
|
|
|
| // This executes a poll loop on the server for more Iq packets, and feeds them
|
| // to the plugin.
|
| @@ -115,7 +116,6 @@ function checkVersion(plugin) {
|
| function init_() {
|
| // Kick off the connection.
|
| var plugin = document.getElementById('remoting');
|
| -
|
| remoting.plugin = plugin;
|
|
|
| // Only allow https connections to the httpXmppProxy.
|
| @@ -150,6 +150,14 @@ function init_() {
|
| registerConnection();
|
| }
|
|
|
| +function pluginLostFocus_() {
|
| + // If the plug loses input focus, release all keys as a precaution against
|
| + // leaving them 'stuck down' on the host.
|
| + if (remoting.plugin) {
|
| + remoting.plugin.releaseAllKeys();
|
| + }
|
| +}
|
| +
|
| function toggleScaleToFit() {
|
| remoting.scaleToFit = !remoting.scaleToFit;
|
| document.getElementById('scale-to-fit-toggle').value =
|
|
|