From 13f592239781e7eec09e390edaf19e02c4b453ae Mon Sep 17 00:00:00 2001 From: Nicolas Lepage <19571875+nlepage@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:08:40 +0200 Subject: [PATCH] fix: attach paste listener on message field paste listener prevents default behavior in unexpected cases such as pasting a password in the passworddecrypt field attaching the paste listener on the message field instead of the whole document should fix this problem --- js/privatebin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index e61b0924..a5bfc578 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -3382,7 +3382,7 @@ jQuery.PrivateBin = (function($) { * @function */ function addClipboardEventHandler() { - $(document).on('paste', function (event) { + $('#message').on('paste', function (event) { const items = (event.clipboardData || event.originalEvent.clipboardData).items; const files = [...items] .filter(item => item.kind === 'file')