Commit 3194759c authored by dpapad's avatar dpapad Committed by Commit Bot

Settings cleanup: Remove obsolete setTimeout() work-around.

This workaround refers to 859794 which is obsolete after removal of
page/subpage animations.

Bug: 859794
Change-Id: I688ec714117f90a797db1b1baacc6eb9d2138751
Reviewed-on: https://chromium-review.googlesource.com/c/1490436Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Reviewed-by: default avatarcalamity <calamity@chromium.org>
Commit-Queue: calamity <calamity@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636347}
parent 8d6729ca
......@@ -41,8 +41,7 @@ cr.define('settings', function() {
/**
* The |subpageScrollTarget| should only be set for this route.
* @type {settings.Route}
* @private
* @private {settings.Route}
*/
subpageRoute: Object,
......@@ -58,20 +57,7 @@ cr.define('settings', function() {
/** @param {!settings.Route} route */
currentRouteChanged: function(route) {
// Immediately set the scroll target to active when this page is
// activated, but wait a task to remove the scroll target when the page is
// deactivated. This gives scroll handlers like iron-list a chance to
// handle scroll events that are fired as a result of the route changing.
// TODO(https://crbug.com/859794): Having this timeout can result some
// jumpy behaviour in the scroll handlers. |this.active_| can be set
// immediately when this bug is fixed.
if (route == this.subpageRoute) {
this.active_ = true;
} else {
setTimeout(() => {
this.active_ = false;
});
}
this.active_ = route == this.subpageRoute;
},
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment