@rails/activestorage 7.0.806 → 7.0.1000
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/README.md
CHANGED
|
@@ -145,7 +145,7 @@ Active Storage, with its included JavaScript library, supports uploading directl
|
|
|
145
145
|
1. Include the Active Storage JavaScript in your application's JavaScript bundle or reference it directly.
|
|
146
146
|
|
|
147
147
|
Requiring directly without bundling through the asset pipeline in the application html with autostart:
|
|
148
|
-
```
|
|
148
|
+
```erb
|
|
149
149
|
<%= javascript_include_tag "activestorage" %>
|
|
150
150
|
```
|
|
151
151
|
Requiring via importmap-rails without bundling through the asset pipeline in the application html without autostart as ESM:
|
|
@@ -767,9 +767,9 @@ function start() {
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
769
|
function didClick(event) {
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
submitButtonsByForm.set(
|
|
770
|
+
const button = event.target.closest("button, input");
|
|
771
|
+
if (button && button.type === "submit" && button.form) {
|
|
772
|
+
submitButtonsByForm.set(button.form, button);
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
|
|
@@ -750,9 +750,9 @@
|
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
function didClick(event) {
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
submitButtonsByForm.set(
|
|
753
|
+
const button = event.target.closest("button, input");
|
|
754
|
+
if (button && button.type === "submit" && button.form) {
|
|
755
|
+
submitButtonsByForm.set(button.form, button);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
function didSubmitForm(event) {
|
package/package.json
CHANGED
package/src/ujs.js
CHANGED
|
@@ -15,9 +15,9 @@ export function start() {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function didClick(event) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
submitButtonsByForm.set(
|
|
18
|
+
const button = event.target.closest("button, input")
|
|
19
|
+
if (button && button.type === "submit" && button.form) {
|
|
20
|
+
submitButtonsByForm.set(button.form, button)
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|