Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1000)

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 7316011: Release all keys on blur. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid error messages on blur before the session is created. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/remoting.js
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index dad9809dbfa8312dd2ebaefbc6ba19ec629dc0bf..8ba24360c2463a1d0b5320b890cd88e93c34e46d 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -7,6 +7,16 @@ var remoting = remoting || {};
(function() {
"use strict";
+window.addEventListener('blur', pluginLostFocus_, false);
+
+function pluginLostFocus_() {
+ // If the plug loses input focus, release all keys as a precaution against
+ // leaving them 'stuck down' on the host.
+ if (remoting.session && remoting.session.plugin) {
+ remoting.session.plugin.releaseAllKeys();
+ }
+}
+
/** @enum {string} */
remoting.AppMode = {
CLIENT: 'client',
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698