Merge pull request #47404 from nextcloud/backport/47363/stable30

[stable30] fix: use empty template by default when pressing enter
This commit is contained in:
Andy Scherzinger 2024-08-29 15:33:13 +02:00 committed by GitHub
commit a56f7cbc03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 17 additions and 7 deletions

View file

@ -6,6 +6,7 @@
<template>
<li class="template-picker__item">
<input :id="id"
ref="input"
:checked="checked"
type="radio"
class="radio"
@ -124,6 +125,9 @@ export default {
onFailure() {
this.failedPreview = true
},
focus() {
this.$refs.input?.focus()
},
},
}
</script>

View file

@ -17,6 +17,7 @@
<!-- Templates list -->
<ul class="templates-picker__list">
<TemplatePreview v-bind="emptyTemplate"
ref="emptyTemplatePreview"
:checked="checked === emptyTemplate.fileid"
@check="onCheck" />
@ -179,6 +180,11 @@ export default defineComponent({
// Else, open the picker
this.opened = true
// Set initial focus to the empty template preview
this.$nextTick(() => {
this.$refs.emptyTemplatePreview?.focus()
})
},
/**

2
dist/1218-1218.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
1218-1218.js.license

2
dist/3235-3235.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/3235-3235.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/3235-3235.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
3235-3235.js.license

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long