summaryrefslogtreecommitdiffstats
path: root/remoting/webapp
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-06 05:44:08 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-06 05:44:08 +0000
commitcb56f0d147cced82cb266dd1fde0f47240f22adf (patch)
tree4e2624f5abf5840e7b5eedec32a97f9e2187bb96 /remoting/webapp
parentc178a234601bc745351061294b9a66690cc9d2cb (diff)
downloadchromium_src-cb56f0d147cced82cb266dd1fde0f47240f22adf.zip
chromium_src-cb56f0d147cced82cb266dd1fde0f47240f22adf.tar.gz
chromium_src-cb56f0d147cced82cb266dd1fde0f47240f22adf.tar.bz2
Don't send mouse events if the plugin doesn't have focus.
This works around http://crbug.com/246335 and reinstates the fix for http://crbug.com/236549. BUG=236549 Review URL: https://codereview.chromium.org/136093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r--remoting/webapp/client_session.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js
index 8a63998..7b0d80e 100644
--- a/remoting/webapp/client_session.js
+++ b/remoting/webapp/client_session.js
@@ -388,7 +388,11 @@ remoting.ClientSession.prototype.pluginLostFocus_ = function() {
this.plugin_.releaseAllKeys();
if (this.plugin_.element()) {
// Focus should stay on the element, not (for example) the toolbar.
- this.plugin_.element().focus();
+ // Due to crbug.com/246335, we can't restore the focus immediately,
+ // otherwise the plugin gets confused about whether or not it has focus.
+ window.setTimeout(
+ this.plugin_.element().focus.bind(this.plugin_.element()),
+ 0);
}
}
};