mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-10 15:30:25 -04: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:
parent
7435097731
commit
13f5922397
1 changed files with 1 additions and 1 deletions
|
@ -3382,7 +3382,7 @@ jQuery.PrivateBin = (function($) {
|
||||||
* @function
|
* @function
|
||||||
*/
|
*/
|
||||||
function addClipboardEventHandler() {
|
function addClipboardEventHandler() {
|
||||||
$(document).on('paste', function (event) {
|
$('#message').on('paste', function (event) {
|
||||||
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
||||||
const files = [...items]
|
const files = [...items]
|
||||||
.filter(item => item.kind === 'file')
|
.filter(item => item.kind === 'file')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue