turbo_modal 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1784474a3a799b2c623b1705a5cf0df011bd809287a81342ceb605fc29930ef3
|
4
|
+
data.tar.gz: 733288280786b1cd6c8463db2351101fbfe7e668f05ac4e0f6367a4309c8b438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28206680aa24756513e5e593cc601cb55b56642b56d67ff826ffff8e55dd7dcaa23904e36aa7c74c1b40a22b2451bbf2edcfb4118766b9a2dab97d37549cbb46
|
7
|
+
data.tar.gz: fddf55d488c5a7f3b1e9953550c9b054cf47e42c0895ea342a2f9d6ffd6cef947a2037532d45d941012e7d689030ddb6a2288ef9e58a292b1196c41c1b4b38ba
|
@@ -19,6 +19,9 @@ class ModalController extends Controller {
|
|
19
19
|
open(e) {
|
20
20
|
this.turboFrameTarget.src = e.detail.url;
|
21
21
|
this.typeValue = e.detail.type;
|
22
|
+
if (event.detail.dismissable) {
|
23
|
+
this.turboFrameTarget.dataset.dismissable = "";
|
24
|
+
}
|
22
25
|
showScrim(e.detail.dismiss);
|
23
26
|
}
|
24
27
|
|
@@ -31,6 +34,7 @@ class ModalController extends Controller {
|
|
31
34
|
setTimeout(() => {
|
32
35
|
modal_element.remove();
|
33
36
|
this.turboFrameTarget.src = null;
|
37
|
+
delete this.turboFrameTarget.dataset.dismissable;
|
34
38
|
|
35
39
|
if (this.typeValue !== "") {
|
36
40
|
this.turboFrameTarget.classList.remove(this.typeValue);
|
@@ -41,7 +45,7 @@ class ModalController extends Controller {
|
|
41
45
|
}
|
42
46
|
|
43
47
|
keyup(event) {
|
44
|
-
if (event.key === "Escape") {
|
48
|
+
if (event.key === "Escape" && this.turboFrameTarget.dataset.dismissable === "") {
|
45
49
|
closeModal();
|
46
50
|
}
|
47
51
|
}
|
data/lib/turbo_modal/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo_modal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Cornthwaite
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|