prevent text pasting if image is pasted

このコミットが含まれているのは:
nik 2019-03-23 22:45:24 -05:00
コミット b241539d4d
1個のファイルの変更2行の追加0行の削除

ファイルの表示

@ -296,6 +296,8 @@ const PostStatusForm = {
},
paste (e) {
if (e.clipboardData.files.length > 0) {
// prevent pasting of file as text
e.preventDefault()
// Strangely, files property gets emptied after event propagation
// Trying to wrap it in array doesn't work. Plus I doubt it's possible
// to hold more than one file in clipboard.