mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix: 🐛 Fix text not working in composer
This commit is contained in:
parent
a643e3f8aa
commit
fab1757d8f
|
|
@ -107,13 +107,13 @@ const files = ref<
|
|||
|
||||
const handlePaste = (event: ClipboardEvent) => {
|
||||
if (event.clipboardData) {
|
||||
event.preventDefault();
|
||||
const items = Array.from(event.clipboardData.items);
|
||||
const newFiles = items
|
||||
.filter((item) => item.kind === "file")
|
||||
.map((item) => item.getAsFile())
|
||||
.filter((file): file is File => file !== null);
|
||||
if (newFiles.length > 0) {
|
||||
event.preventDefault();
|
||||
files.value.push(
|
||||
...newFiles.map((file) => ({
|
||||
id: nanoid(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue