0
0
Fork 0

fix: src/components/EditPictureForm.vue

This commit is contained in:
Javier Segarra 2024-05-31 13:33:03 +02:00
parent d5dc9d974c
commit d8bf95008a
2 changed files with 18 additions and 24 deletions

View File

@ -24,8 +24,7 @@ export default {
firstInputElement.focus();
}
const that = this;
for (const availableInput of availableInputs) {
availableInput.addEventListener('keydown', (evt) => {
this.$el.addEventListener('keyup', function (evt) {
if (evt.key === 'Enter') {
const input = evt.target;
console.log('input', input);
@ -45,6 +44,5 @@ export default {
});
}
}
}
},
};

View File

@ -155,7 +155,7 @@ const rotateRight = () => {
editor.value.rotate(-90);
};
const onUploadAccept = () => {
const onSubmit = () => {
try {
if (!newPhoto.files && !newPhoto.url) {
notify(t('Select an image'), 'negative');
@ -206,11 +206,7 @@ const makeRequest = async () => {
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
auto-load
/>
<QForm
@submit="onUploadAccept()"
@keyup.enter="onUploadAccept()"
class="all-pointer-events"
>
<QForm @submit="onSubmit()" class="all-pointer-events">
<QCard class="q-pa-lg">
<span ref="closeButton" class="close-icon" v-close-popup>
<QIcon name="close" size="sm" />