Add textarea to list of html tags that skip document-wide onPaste

This commit is contained in:
Nuno Campos
2017-02-01 19:06:53 +00:00
committed by Feross Aboukhadijeh
parent efc984f1dd
commit e01c0b6f43

View File

@@ -472,8 +472,10 @@ function onError (err) {
update()
}
const editableHtmlTags = new Set(['input', 'textarea'])
function onPaste (e) {
if (e.target.tagName.toLowerCase() === 'input') return
if (editableHtmlTags.has(e.target.tagName.toLowerCase())) return
controllers.torrentList().addTorrent(electron.clipboard.readText())
update()