Index: remoting/webapp/client_session.js |
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js |
index 3a78b4e3ccdce11b1a94f414ad21953249e7b753..79aeae2260760793128910145320a4a5979ba61e 100644 |
--- a/remoting/webapp/client_session.js |
+++ b/remoting/webapp/client_session.js |
@@ -348,7 +348,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); |
weitao
2014/02/07 23:54:23
Nice trick. :)
|
} |
} |
}; |