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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "*"
6
6
  ],
7
- "version": "4.57.2",
7
+ "version": "4.57.4",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Terrier-Tech/terrier-engine"
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