Merge branch 'file-paste' into 'develop'
#455 - prevent text pasting if image is pasted Closes #455 See merge request pleroma/pleroma-fe!705
This commit is contained in:
commit
57b82e9236
1 changed files with 2 additions and 0 deletions
|
@ -296,6 +296,8 @@ const PostStatusForm = {
|
||||||
},
|
},
|
||||||
paste (e) {
|
paste (e) {
|
||||||
if (e.clipboardData.files.length > 0) {
|
if (e.clipboardData.files.length > 0) {
|
||||||
|
// prevent pasting of file as text
|
||||||
|
e.preventDefault()
|
||||||
// Strangely, files property gets emptied after event propagation
|
// Strangely, files property gets emptied after event propagation
|
||||||
// Trying to wrap it in array doesn't work. Plus I doubt it's possible
|
// Trying to wrap it in array doesn't work. Plus I doubt it's possible
|
||||||
// to hold more than one file in clipboard.
|
// to hold more than one file in clipboard.
|
||||||
|
|
Loading…
Reference in a new issue