I have problem in telegram web app on macOS (Vue js). If i use input with type file, then click and choose nothing - input don't work again.
<template>
<div>
<button @click="triggerFileInput">Add document</button>
<input
type="file"
ref="fileInput"
style="display: none"
@change="handleFileChange"
/>
</div>
</template>
<script setup>
import { ref } from 'vue';
const fileInput = ref(null);
const triggerFileInput = (event) => {
event.preventDefault();
fileInput.value.click();
};
const handleFileChange = (event) => {
const files = event.target.files;
if (files.length > 0) {
console.log(files[0]);
}
event.target.value = '';
};
</script>