Skip to content

Commit 84aaac4

Browse files
[6.x] Avoid Bard image alt input being focused on page load (#13705)
1 parent 2a2c01c commit 84aaac4

File tree

1 file changed

+7
-1
lines changed
  • resources/js/components/fieldtypes/bard

1 file changed

+7
-1
lines changed

resources/js/components/fieldtypes/bard/Image.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
@paste.stop
2929
>
3030
<Input
31+
ref="alt"
3132
name="alt"
32-
:focus="showingAltEdit"
3333
v-model="alt"
3434
:placeholder="assetAlt"
3535
:prepend="__('Alt Text')"
@@ -156,6 +156,12 @@ export default {
156156
alt(alt) {
157157
this.updateAttributes({ alt });
158158
},
159+
160+
showingAltEdit(showingAltEdit) {
161+
if (showingAltEdit) {
162+
this.$nextTick(() => this.$refs.alt.focus());
163+
}
164+
},
159165
},
160166
161167
methods: {

0 commit comments

Comments
 (0)