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

Unified Diff: ui/webui/resources/cr_elements/cr_scrollable_behavior.js

Issue 2453923002: Tweak 'scroll' listener registration in CrScrollableBehavior. (Closed)
Patch Set: Remove attached/detached, use ready. Created 4 years, 2 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: ui/webui/resources/cr_elements/cr_scrollable_behavior.js
diff --git a/ui/webui/resources/cr_elements/cr_scrollable_behavior.js b/ui/webui/resources/cr_elements/cr_scrollable_behavior.js
index 407fb396a8ac2e85c545f62ad4ce9b437ce16bc2..362753f91b74638a2ba647db2f6d5f85844200c7 100644
--- a/ui/webui/resources/cr_elements/cr_scrollable_behavior.js
+++ b/ui/webui/resources/cr_elements/cr_scrollable_behavior.js
@@ -36,7 +36,7 @@
/** @polymerBehavior */
var CrScrollableBehavior = {
- attached: function() {
+ ready: function() {
var scrollableElements = this.root.querySelectorAll('[scrollable]');
// Setup the intial scrolling related classes for each scrollable container.
@@ -50,15 +50,6 @@ var CrScrollableBehavior = {
scrollable.addEventListener('scroll', this.updateScrollEvent_.bind(this));
},
- detached: function() {
- // Remove 'scroll' event listeners.
- var scrollableElements = this.root.querySelectorAll('[scrollable]');
- for (let scrollable of scrollableElements) {
- scrollable.removeEventListener(
- 'scroll', this.updateScrollEvent_.bind(this));
- }
- },
-
/**
* Called any time the contents of a scrollable container may have changed.
* This ensures that the <iron-list> contents of dynamically sized
« 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