Don't set display: none under legacyOptimizations. Fixes #5541.

This commit is contained in:
Kevin Schaaf
2019-05-17 08:53:48 -07:00
parent 6be58b08d1
commit c9cf56c075
3 changed files with 12 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -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 `<dom-if>` element will stamp a light-dom `<template>` child when
@@ -134,7 +135,9 @@ export class DomIf extends PolymerElement {
*/
connectedCallback() {
super.connectedCallback();
this.style.display = 'none';
if (!legacyOptimizations) {
this.style.display = 'none';
}
if (this.if) {
this.__debounceRender();
}

View File

@@ -16,6 +16,7 @@ import { OptionalMutableData } from '../mixins/mutable-data.js';
import { matches, translate } from '../utils/path.js';
import { timeOut, microTask } from '../utils/async.js';
import { wrap } from '../utils/wrap.js';
import { legacyOptimizations } from '../utils/settings.js';
/**
* @constructor
@@ -320,7 +321,9 @@ export class DomRepeat extends domRepeatBase {
*/
connectedCallback() {
super.connectedCallback();
this.style.display = 'none';
if (!legacyOptimizations) {
this.style.display = 'none';
}
// only perform attachment if the element was previously detached.
if (this.__isDetached) {
this.__isDetached = false;