vgapp 0.6.8 → 0.6.9

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.
@@ -187,6 +187,8 @@ class VGModal extends BaseModule {
187
187
  this._isShown = false;
188
188
  this._isTransitioning = true;
189
189
 
190
+ document.body.classList.remove(CLASS_NAME_OPEN);
191
+
190
192
  setTimeout(() => {
191
193
  this._element.classList.remove(CLASS_NAME_SHOW);
192
194
  this._queueCallback(() => this._hideModal(openedModals, isLeaveBackDrop), this._element, this._isAnimatedFade());
@@ -194,31 +196,24 @@ class VGModal extends BaseModule {
194
196
  }
195
197
 
196
198
  _hideModal(openedModals, isLeaveBackDrop) {
197
- this._element.style.display = 'none';
198
- this._element.removeAttribute('aria-modal');
199
- this._element.removeAttribute('role');
200
- this._isTransitioning = false;
199
+ if (!isLeaveBackDrop) {
200
+ this._element.style.display = 'none';
201
+ this._element.removeAttribute('aria-modal');
202
+ this._element.removeAttribute('role');
203
+ this._isTransitioning = false;
201
204
 
202
- if (openedModals.length) return;
205
+ if (openedModals.length) return;
203
206
 
204
- if (this._params.hash) {
205
- history.pushState("", document.title, window.location.pathname + window.location.search);
206
- }
207
+ if (this._params.hash) {
208
+ history.pushState("", document.title, window.location.pathname + window.location.search);
209
+ }
207
210
 
208
- if (!isLeaveBackDrop) {
209
211
  Backdrop.hide(() => {
210
- document.body.classList.remove(CLASS_NAME_OPEN);
211
212
  this._resetAdjustments();
212
213
  this._scrollBar.reset();
213
214
 
214
215
  EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
215
216
  })
216
- } else {
217
- document.body.classList.remove(CLASS_NAME_OPEN);
218
- this._resetAdjustments();
219
- this._scrollBar.reset();
220
-
221
- EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
222
217
  }
223
218
  }
224
219
 
@@ -120,6 +120,8 @@ class VGSidebar extends BaseModule {
120
120
  const hideEvent = EventHandler.trigger(this._element, EVENT_KEY_HIDE);
121
121
  if (hideEvent.defaultPrevented) return;
122
122
 
123
+ document.body.classList.remove(CLASS_NAME_OPEN);
124
+
123
125
  setTimeout(() => {
124
126
  this._element.setAttribute('aria-expanded', false);
125
127
  this._element.classList.remove(CLASS_NAME_SHOW);
@@ -133,18 +135,17 @@ class VGSidebar extends BaseModule {
133
135
  }
134
136
  });
135
137
  }
136
- }
137
138
 
138
- if (this._params.overflow) {
139
- Overflow.destroy();
140
- }
139
+ if (this._params.overflow) {
140
+ Overflow.destroy();
141
+ }
141
142
 
142
- if (this._params.hash) {
143
- history.pushState("", document.title, window.location.pathname + window.location.search);
144
- }
143
+ if (this._params.hash) {
144
+ history.pushState("", document.title, window.location.pathname + window.location.search);
145
+ }
145
146
 
146
- document.body.classList.remove(CLASS_NAME_OPEN);
147
- EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
147
+ EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
148
+ }
148
149
  }
149
150
  this._queueCallback(completeCallback, this._element, true);
150
151
  }, this._params.animation.delay);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgapp",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "",
5
5
  "author": {
6
6
  "name": "Vegas Studio",