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

Unified Diff: remoting/webapp/client_session.js

Issue 12795003: Reset bump-scroll offsets when leaving full-screen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/client_session.js
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js
index 89fcc82eb70c599e38ebb407f7156e06890978b4..c93f2c33a152369b4b76874227c02de16134e3c7 100644
--- a/remoting/webapp/client_session.js
+++ b/remoting/webapp/client_session.js
@@ -954,7 +954,8 @@ remoting.ClientSession.prototype.scroll_ = function(dx, dy) {
}
/**
- * Enable or disable bump-scrolling.
+ * Enable or disable bump-scrolling. When disabling bump scrolling, also reset
+ * the scroll offsets to (0, 0).
* @private
* @param {boolean} enable True to enable bump-scrolling, false to disable it.
*/
@@ -968,6 +969,8 @@ remoting.ClientSession.prototype.enableBumpScroll_ = function(enable) {
this.plugin.element().removeEventListener('mousemove', this.onMouseMoveRef_,
false);
this.onMouseMoveRef_ = null;
+ this.plugin.element().style.marginLeft = 0;
+ this.plugin.element().style.marginTop = 0;
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698