Skip to content

Commit f029cb8

Browse files
committed
Fixed the paste trigger run 3 times when paste a image in the browser.
1 parent 59c85a0 commit f029cb8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/js/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ function init() {
3434
"docs",
3535
`${assetHost}${mixManifest["/docs/index.st"] ?? "/docs/index.st"}`,
3636
);
37+
38+
let textarea = document.getElementById("text_area");
39+
if (textarea != null) {
40+
pasteImage(textarea);
41+
}
3742
}
3843

3944
let stork_container = document.querySelector("input[data-stork='docs']");
4045
if (stork_container != null) {
4146
stork.attach("docs");
4247
}
43-
44-
let textarea = document.getElementById("text_area");
45-
if (textarea != null) {
46-
pasteImage(textarea);
47-
}
4848
}
4949

5050
htmx.onLoad(init);

0 commit comments

Comments
 (0)