summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch <jamiewalch@chromium.org>2015-06-08 12:01:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-08 19:03:20 +0000
commit767ba5e87377b1dcd7f27745efbf9a4cafe3c708 (patch)
tree061e7d5ae877fe8f51f66b5d2b6d551c482c77f2 /remoting
parentfac41e8211138d7e18559f6a968fbc0f55951d82 (diff)
downloadchromium_src-767ba5e87377b1dcd7f27745efbf9a4cafe3c708.zip
chromium_src-767ba5e87377b1dcd7f27745efbf9a4cafe3c708.tar.gz
chromium_src-767ba5e87377b1dcd7f27745efbf9a4cafe3c708.tar.bz2
Suppress spurious onRestore callback.
Due to https://crbug.com/394819, ChromeOS generates an onRestored event when transitioning from maximized to full-screen. This event fires *after* the onFullscreen event, so must be filtered out. This is the underlying cause of https://crbug.com/495329 BUG=495329 Review URL: https://codereview.chromium.org/1156303016 Cr-Commit-Position: refs/heads/master@{#333309}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/crd/js/fullscreen_v2.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/remoting/webapp/crd/js/fullscreen_v2.js b/remoting/webapp/crd/js/fullscreen_v2.js
index d2fb26a..616c77d 100644
--- a/remoting/webapp/crd/js/fullscreen_v2.js
+++ b/remoting/webapp/crd/js/fullscreen_v2.js
@@ -117,6 +117,11 @@ remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() {
*/
remoting.FullscreenAppsV2.prototype.onRestored_ = function() {
if (!this.isMinimized_) {
+ // ChromeOS fires a spurious onRestored event going maximized->fullscreen.
+ // TODO(jamiewalch): Remove this work-around when crbug.com/394819 is fixed.
+ if (remoting.platformIsChromeOS() && this.isActive()) {
+ return;
+ }
document.body.classList.remove('fullscreen');
this.raiseEvent_(false);
}