From 767ba5e87377b1dcd7f27745efbf9a4cafe3c708 Mon Sep 17 00:00:00 2001 From: jamiewalch Date: Mon, 8 Jun 2015 12:01:45 -0700 Subject: [PATCH] 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} --- remoting/webapp/crd/js/fullscreen_v2.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/remoting/webapp/crd/js/fullscreen_v2.js b/remoting/webapp/crd/js/fullscreen_v2.js index d2fb26a45f79..616c77dc5dc7 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); } -- 2.11.4.GIT