Skip to content

Commit 4a1be70

Browse files
authored
fix(framework): managedSlots: true always has effect (#1952)
1 parent f0e2bac commit 4a1be70

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/base/src/UI5Element.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ class UI5Element extends HTMLElement {
113113

114114
this._inDOM = true;
115115

116+
if (slotsAreManaged) {
117+
// always register the observer before yielding control to the main thread (await)
118+
this._startObservingDOMChildren();
119+
await this._processChildren();
120+
}
121+
116122
// Render the Shadow DOM
117123
if (needsShadowDOM) {
118-
if (slotsAreManaged) {
119-
// always register the observer before yielding control to the main thread (await)
120-
this._startObservingDOMChildren();
121-
await this._processChildren();
122-
}
123-
124124
if (!this.shadowRoot) { // Workaround for Firefox74 bug
125125
await Promise.resolve();
126126
}
@@ -130,7 +130,7 @@ class UI5Element extends HTMLElement {
130130
}
131131

132132
RenderScheduler.register(this);
133-
await RenderScheduler.renderImmediately(this);
133+
RenderScheduler.renderImmediately(this);
134134
this._domRefReadyPromise._deferredResolve();
135135
this._fullyConnected = true;
136136
if (typeof this.onEnterDOM === "function") {
@@ -150,11 +150,11 @@ class UI5Element extends HTMLElement {
150150

151151
this._inDOM = false;
152152

153-
if (needsShadowDOM) {
154-
if (slotsAreManaged) {
155-
this._stopObservingDOMChildren();
156-
}
153+
if (slotsAreManaged) {
154+
this._stopObservingDOMChildren();
155+
}
157156

157+
if (needsShadowDOM) {
158158
RenderScheduler.deregister(this);
159159
if (this._fullyConnected) {
160160
if (typeof this.onExitDOM === "function") {

0 commit comments

Comments
 (0)