mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 09:13:21 +03:00
Fix file attach from clipboard when copy from browser. Closes #96
This commit is contained in:
@@ -45,7 +45,18 @@ const AttachmentAddZone = React.memo(({ children, onCreate }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const handlePaste = (event) => {
|
||||
const item = event.clipboardData && event.clipboardData.items[0];
|
||||
if (!event.clipboardData) {
|
||||
return;
|
||||
}
|
||||
|
||||
const file = event.clipboardData.files[0];
|
||||
|
||||
if (file) {
|
||||
submit(file);
|
||||
return;
|
||||
}
|
||||
|
||||
const item = event.clipboardData.items[0];
|
||||
|
||||
if (!item) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user