From 1829b94752a3cf01773d7d360adb2c18e528fcc8 Mon Sep 17 00:00:00 2001 From: Kylart Date: Wed, 6 Jan 2021 03:29:28 +0100 Subject: [PATCH] Fix wrong handling of paste event that would result in streaming from a magnet if pasting into input for download for eg --- src/renderer/mixins/global/readMagnet.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/mixins/global/readMagnet.js b/src/renderer/mixins/global/readMagnet.js index b04339d..6566213 100644 --- a/src/renderer/mixins/global/readMagnet.js +++ b/src/renderer/mixins/global/readMagnet.js @@ -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()