rails_modal_manager 1.0.3 → 1.0.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2f67902f2a1a7d3f98a0318b84ebd2adeeec5d1d8067ead263ea394fc76d64a
|
|
4
|
+
data.tar.gz: 88ab650eaaf8eb145a1fe7844dec22acf2e0e61381e2e1217ee172fea6bee283
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 120b2415ca136f031f10805151f948e6616754c2e6c07c303fb115f9f87f56f66037688f93fbfd95398a3612d79f84f0c398e006654f434222b5304cfb1fa3d8
|
|
7
|
+
data.tar.gz: 29edd0abdbc5cf321eb818366a86998e18cdc3dce2b39cf37e5a4ba75866224e8b8750adbc32548167ddefa217302a86a518de6610eeb6dbe659b397791cb063
|
|
@@ -90,7 +90,7 @@ export default class extends Controller {
|
|
|
90
90
|
openValueChanged(value, previousValue) {
|
|
91
91
|
if (value && !previousValue) {
|
|
92
92
|
this.open()
|
|
93
|
-
} else if (!value && previousValue) {
|
|
93
|
+
} else if (!value && previousValue && !this._closingProgrammatically) {
|
|
94
94
|
this.close('programmatic')
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -347,6 +347,12 @@ export default class extends Controller {
|
|
|
347
347
|
if (overlay) overlay.classList.remove('rmm-active')
|
|
348
348
|
|
|
349
349
|
setTimeout(() => {
|
|
350
|
+
// Reset openValue to false so modal can be reopened
|
|
351
|
+
// Use a flag to prevent openValueChanged from triggering close again
|
|
352
|
+
this._closingProgrammatically = true
|
|
353
|
+
this.openValue = false
|
|
354
|
+
this._closingProgrammatically = false
|
|
355
|
+
|
|
350
356
|
if (callback) callback()
|
|
351
357
|
}, this.animationDurationValue)
|
|
352
358
|
}
|