From c9cf56c0752613d84d3f6f8f3abf1b02a675d2f0 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Fri, 17 May 2019 08:53:48 -0700 Subject: [PATCH] Don't set display: none under legacyOptimizations. Fixes #5541. --- lib/elements/dom-bind.js | 5 ++++- lib/elements/dom-if.js | 5 ++++- lib/elements/dom-repeat.js | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/elements/dom-bind.js b/lib/elements/dom-bind.js index e02d041a90..72bfbbdd17 100644 --- a/lib/elements/dom-bind.js +++ b/lib/elements/dom-bind.js @@ -14,6 +14,7 @@ import { OptionalMutableData } from '../mixins/mutable-data.js'; import { GestureEventListeners } from '../mixins/gesture-event-listeners.js'; import { strictTemplatePolicy } from '../utils/settings.js'; import { wrap } from '../utils/wrap.js'; +import { legacyOptimizations } from '../utils/settings.js'; /** * @constructor @@ -75,7 +76,9 @@ export class DomBind extends domBindBase { * @return {void} */ connectedCallback() { - this.style.display = 'none'; + if (!legacyOptimizations) { + this.style.display = 'none'; + } this.render(); } diff --git a/lib/elements/dom-if.js b/lib/elements/dom-if.js index a13940ad1a..4fe29ef63d 100644 --- a/lib/elements/dom-if.js +++ b/lib/elements/dom-if.js @@ -15,6 +15,7 @@ import { enqueueDebouncer, flush } from '../utils/flush.js'; import { microTask } from '../utils/async.js'; import { root } from '../utils/path.js'; import { wrap } from '../utils/wrap.js'; +import { legacyOptimizations } from '../utils/settings.js'; /** * The `` element will stamp a light-dom `