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

Unified Diff: remoting/webapp/fullscreen_v1.js

Issue 575303002: Fix bump-scroll on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « no previous file | remoting/webapp/toolbar.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/fullscreen_v1.js
diff --git a/remoting/webapp/fullscreen_v1.js b/remoting/webapp/fullscreen_v1.js
index 063925b715708a0cb5317be6a56a3715ed55bc3a..5935e3555433988d3c5260063d10f7989b577bb2 100644
--- a/remoting/webapp/fullscreen_v1.js
+++ b/remoting/webapp/fullscreen_v1.js
@@ -79,5 +79,15 @@ remoting.FullscreenAppsV1.prototype.removeListener = function(callback) {
* @private
*/
remoting.FullscreenAppsV1.prototype.onFullscreenChanged_ = function() {
- this.eventSource_.raiseEvent(this.kEventName_, this.isActive());
+ // Querying full-screen immediately after the webkitfullscreenchange
+ // event fires sometimes gives the wrong answer on Mac, perhaps due to
+ // the time taken to animate presentation mode. Since I haven't been able
+ // to isolate the exact repro steps, and we're not planning on using this
+ // API for much longer, this hack will suffice for now.
+ window.setTimeout(
+ /** @this {remoting.FullscreenAppsV1} */
+ function() {
+ this.eventSource_.raiseEvent(this.kEventName_, this.isActive());
+ }.bind(this),
+ 500);
};
« no previous file with comments | « no previous file | remoting/webapp/toolbar.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698