Commit 1d9686d1 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Settings WebUI: avoid updating knob position when page is not visible

Bug: 929782
Change-Id: I0b5be762f584fdada8cc92b47508f99867189c70
Reviewed-on: https://chromium-review.googlesource.com/c/1459067
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630622}
parent 0c1ab786
......@@ -100,7 +100,7 @@ Polymer({
return false;
});
this.async(function() {
setTimeout(() => {
// This is needed to make sure that the positions of the knobs and their
// label bubbles are correctly updated when the display settings page is
// opened for the first time after login. The page need to be fully
......@@ -341,7 +341,8 @@ Polymer({
* @private
*/
updateKnobs_: function() {
if (!this.isReady_ || !this.prefsAvailable()) {
if (!this.isReady_ || !this.prefsAvailable() ||
this.$.sliderBar.offsetWidth == 0) {
return;
}
const startOffsetMinutes = /** @type {number} */ (
......
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