Commit 60f40c35 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Settings: workaround iron-list rendering issue by clearing sites on route change

Bug: 851431
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Ib81a7c7bc9cd2177919702c078b140e6a0b39281
Reviewed-on: https://chromium-review.googlesource.com/1096351
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568258}
parent 707fa79d
...@@ -138,6 +138,7 @@ js_library("site_data_details_subpage") { ...@@ -138,6 +138,7 @@ js_library("site_data_details_subpage") {
deps = [ deps = [
":local_data_browser_proxy", ":local_data_browser_proxy",
"..:route", "..:route",
"//third_party/polymer/v1_0/components-chromium/iron-list:iron-list-extracted",
"//ui/webui/resources/js:cr", "//ui/webui/resources/js:cr",
"//ui/webui/resources/js:web_ui_listener_behavior", "//ui/webui/resources/js:web_ui_listener_behavior",
] ]
......
...@@ -103,6 +103,11 @@ Polymer({ ...@@ -103,6 +103,11 @@ Polymer({
this, currentRoute); this, currentRoute);
if (currentRoute == settings.routes.SITE_SETTINGS_SITE_DATA) { if (currentRoute == settings.routes.SITE_SETTINGS_SITE_DATA) {
this.isLoading_ = true; this.isLoading_ = true;
// Needed to fix iron-list rendering issue. The list will not render
// correctly until a scroll occurs.
// See https://crbug.com/853906.
const ironList = /** @type {!IronListElement} */ (this.$$('iron-list'));
ironList.scrollToIndex(0);
this.browserProxy_.reloadCookies().then(this.updateSiteList_.bind(this)); this.browserProxy_.reloadCookies().then(this.updateSiteList_.bind(this));
} }
}, },
......
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