diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-03-25 16:52:25 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-03-25 16:52:25 +0000 |
| commit | 57b82e9236637ce7e0902948dcb0f30bade28dfa (patch) | |
| tree | 5a43c3ba82dbe0b05a90b04427974bdbc3f1dbbb /src | |
| parent | 182eab051ded319a5fd2a6bf5c216621f76446e2 (diff) | |
| parent | b241539d4df0c3a277723cb308c39a5e9665b7b1 (diff) | |
Merge branch 'file-paste' into 'develop'
#455 - prevent text pasting if image is pasted
Closes #455
See merge request pleroma/pleroma-fe!705
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 1f0df35a..c5f30ca6 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -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. |
