terrier-engine 4.57.2 → 4.57.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/terrier/modals.ts +5 -5
package/package.json
CHANGED
package/terrier/modals.ts
CHANGED
|
@@ -160,14 +160,14 @@ export class ModalStackPart extends TerrierPart<{}> {
|
|
|
160
160
|
this.modals.push(modal)
|
|
161
161
|
|
|
162
162
|
const container = this.element?.querySelector<HTMLElement>('.modal-container')
|
|
163
|
-
if (container) {
|
|
163
|
+
if (!container || this.displayClass !== 'show') {
|
|
164
|
+
// haven't rendered yet, or was previously closed, make sure the stack is shown, then render
|
|
165
|
+
this.displayClass = 'show'
|
|
166
|
+
this.dirty()
|
|
167
|
+
} else {
|
|
164
168
|
// already rendered, append the modal to the stack without re-rendering the rest of the stack
|
|
165
169
|
modal.appendIntoContainer(container).classList.add('hide')
|
|
166
170
|
this.stale()
|
|
167
|
-
} else {
|
|
168
|
-
// haven't rendered yet, make sure the stack is shown, then render
|
|
169
|
-
this.displayClass = 'show'
|
|
170
|
-
this.dirty()
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
return modal
|