mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
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
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user