Skip to content
Snippets Groups Projects
Commit b241539d authored by nik's avatar nik
Browse files

prevent text pasting if image is pasted

parent f86a5dc8
No related branches found
No related tags found
2 merge requests!1028`master` refresh with `develop`,!705#455 - prevent text pasting if image is pasted
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment