Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
b241539d
Commit
b241539d
authored
6 years ago
by
nik
Browse files
Options
Downloads
Patches
Plain Diff
prevent text pasting if image is pasted
parent
f86a5dc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1028
`master` refresh with `develop`
,
!705
#455 - prevent text pasting if image is pasted
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/post_status_form/post_status_form.js
+2
-0
2 additions, 0 deletions
src/components/post_status_form/post_status_form.js
with
2 additions
and
0 deletions
src/components/post_status_form/post_status_form.js
+
2
−
0
View file @
b241539d
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment