Skip to content

Commit

Permalink
Allow images to be pasted on the edit post page
Browse files Browse the repository at this point in the history
  • Loading branch information
neobooru committed May 1, 2024
1 parent 6599023 commit d51e591
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/js/controls/file_dropper_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ class FileDropperControl extends events.EventTarget {
this._urlInputNode.addEventListener("keydown", (e) =>
this._evtUrlInputKeyDown(e)
);
this._urlInputNode.addEventListener("paste", (e) => {
// document.onpaste is used on the post-upload page.
// And this event is used on the post edit page.
if (document.getElementById("post-upload")) return;
this._evtPaste(e)
});
}
if (this._urlConfirmButtonNode) {
this._urlConfirmButtonNode.addEventListener("click", (e) =>
Expand Down

0 comments on commit d51e591

Please sign in to comment.