Commit d9d91288 authored by Michael Hansen's avatar Michael Hansen Committed by Commit Bot

Fix missing devices on Bluetooth settings subpage.

The Bluetooth settings subpage has two iron-list elements, one for
paired devices and one for unpaired devices. On an interval we look for
devices and then call updateScrollabelContents() to update the UI.

If there are no devices in one of the lists, it will remain hidden with
a |scrollHeight| of 0. This will cause the timed interval to never be
cleared, and updateScrollableContents() will continuously exit early,
leaving the other list in a stale state.

This CL will only recheck a list if it is not hidden.

A corresponding UI test will be added in a future task:
  https://bugs.chromium.org/p/chromium/issues/detail?id=1121679

Bug: 1107646
Change-Id: I81b090e4b0052a0abff6cbf9dab5257318571b9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353562
Commit-Queue: Michael Hansen <hansenmichael@google.com>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801536}
parent e5b6ec69
...@@ -110,7 +110,10 @@ ...@@ -110,7 +110,10 @@
const ironList = /** @type {!IronListElement} */ (node); const ironList = /** @type {!IronListElement} */ (node);
ironList.notifyResize(); ironList.notifyResize();
} }
if (scrollHeight <= 1) {
// TODO(crbug.com/1121679): Add UI Test for this behavior.
if (scrollHeight <= 1 &&
window.getComputedStyle(node.parentNode).display !== 'none') {
checkAgain.push({ checkAgain.push({
node: node, node: node,
lastScrollHeight: scrollHeight, lastScrollHeight: scrollHeight,
......
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