Fix wrong handling of paste event that would result in streaming from a magnet if pasting into input for download for eg

This commit is contained in:
Kylart 2021-01-06 03:29:28 +01:00
parent 675ae8e71e
commit 1829b94752
1 changed files with 5 additions and 0 deletions

View File

@ -14,9 +14,14 @@ export default {
},
methods: {
/**
* @param {ClipboardEvent} e
*/
handlePaste (e) {
const text = e.clipboardData.getData('text')
if (e.target.tagName.toUpperCase() === 'INPUT') return
if (/magnet:\?/.test(text)) {
if (!this.isClientPage) {
e.preventDefault()