Commit e0142467 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

Settings WebUI: Fix empty iron-lists on direct navigations.

Stop waiting on the lazy_load.html loading before expanding a settings
subpage. Waiting is unnecessary, and also triggers an unfortunate iron-list
behavior where no items are rendered when its dimensions are 0x0 (essentially
when hidden).

Waiting was introduced at r719484, and by removing the waiting the code works
more similar to before, while still triggering the loading of lazy_load.html.

Bug: 1029703
Change-Id: Iae1aaaa2eaf9227b61999201a020e60d2d048c9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947957Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721116}
parent 62b8ac07
...@@ -201,14 +201,14 @@ cr.define('settings', function() { ...@@ -201,14 +201,14 @@ cr.define('settings', function() {
// shared between chrome://settings and chrome://os-settings. // shared between chrome://settings and chrome://os-settings.
const lazyLoadPathPrefix = const lazyLoadPathPrefix =
window.origin === 'chrome://settings' ? '' : '/chromeos'; window.origin === 'chrome://settings' ? '' : '/chromeos';
Polymer.importHref(`${lazyLoadPathPrefix}/lazy_load.html`, () => { Polymer.importHref(`${lazyLoadPathPrefix}/lazy_load.html`, () => {});
this.ensureSectionForRoute_(route).then(section => {
section.classList.add('expanded');
// Fire event used by a11y tests only.
this.fire('settings-section-expanded');
this.fire('show-container'); this.ensureSectionForRoute_(route).then(section => {
}); section.classList.add('expanded');
// Fire event used by a11y tests only.
this.fire('settings-section-expanded');
this.fire('show-container');
}); });
}, },
......
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