Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
28b51f75
Commit
28b51f75
authored
Jul 03, 2019
by
Kim Alvefur
Committed by
JC Brand
Jul 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support sending files from clipboard (fixes #1585)
parent
3bd8c6db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
CHANGES.md
CHANGES.md
+1
-0
src/converse-chatview.js
src/converse-chatview.js
+9
-0
No files found.
CHANGES.md
View file @
28b51f75
...
...
@@ -50,6 +50,7 @@
-
#1576: Converse gets stuck with spinner when logging out with
`auto_login`
set to
`true`
-
#1579: Trim spaces at the beginning and end of a JID (when adding contact)
-
#1586: Not possible to kick someone with a space in their nickname
-
#1585: Upload files by pasting from clipboard
### Breaking changes
...
...
src/converse-chatview.js
View file @
28b51f75
...
...
@@ -972,6 +972,15 @@ converse.plugins.add('converse-chatview', {
},
onPaste
(
ev
)
{
if
(
ev
.
clipboardData
.
files
.
length
!==
0
)
{
ev
.
preventDefault
();
// Workaround for quirk in at least Firefox 60.7 ESR:
// It seems that pasted files disappear from the event payload after
// the event has finished, which apparently happens during async
// processing in sendFiles(). So we copy the array here.
this
.
model
.
sendFiles
(
Array
.
from
(
ev
.
clipboardData
.
files
));
return
;
}
this
.
updateCharCounter
(
ev
.
clipboardData
.
getData
(
'
text/plain
'
));
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment