Skip to content

Commit

Permalink
Don't set display: none under legacyOptimizations. Fixes #5541.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed May 17, 2019
1 parent 6be58b0 commit c9cf56c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/elements/dom-bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -75,7 +76,9 @@ export class DomBind extends domBindBase {
* @return {void}
*/
connectedCallback() {
this.style.display = 'none';
if (!legacyOptimizations) {
this.style.display = 'none';
}
this.render();
}

Expand Down
5 changes: 4 additions & 1 deletion lib/elements/dom-if.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
Expand Down
5 changes: 4 additions & 1 deletion lib/elements/dom-repeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c9cf56c

Please sign in to comment.