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

Unified Diff: chrome/browser/resources/settings/settings_main/settings_main.js

Issue 2365453002: MD Settings: Fix clipping of search bubbles by card boundary. (Closed)
Patch Set: Use listen/unlisten instead. Created 4 years, 1 month 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
Index: chrome/browser/resources/settings/settings_main/settings_main.js
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js
index 929f94a04a2d6e41c76372a3750f3772f4de849e..35cb61094006288cd47ada3441ba0ae85e23d74c 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -90,10 +90,16 @@ Polymer({
/** @override */
attached: function() {
+ this.listen(this, 'freeze-scroll', 'onFreezeScroll_');
var currentRoute = settings.getCurrentRoute();
this.hasExpandedSection_ = currentRoute && currentRoute.isSubpage();
},
+ /** @override */
+ detached: function() {
+ this.unlisten(this, 'freeze-scroll', 'onFreezeScroll_');
+ },
+
/** @private */
overscrollChanged_: function() {
if (!this.overscroll_ && this.boundScroll_) {
@@ -133,12 +139,11 @@ Polymer({
* Enables or disables user scrolling, via overscroll: hidden. Room for the
* hidden scrollbar is added to prevent the page width from changing back and
* forth. Also freezes the overscroll height.
- * @param {!Event} e
- * @param {boolean} detail True to freeze, false to unfreeze.
+ * @param {!Event} e |e.detail| is true to freeze, false to unfreeze.
* @private
*/
- onFreezeScroll_: function(e, detail) {
- if (detail) {
+ onFreezeScroll_: function(e) {
+ if (e.detail) {
// Update the overscroll and ignore scroll events.
this.setOverscroll_(this.overscrollHeight_());
this.ignoreScroll_ = true;

Powered by Google App Engine
This is Rietveld 408576698