From c2d20f384cf75a35d319cfdbc8f33d8f1e097f51 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 1 Sep 2025 20:32:00 +0200 Subject: [PATCH] fix(links): do not steal focus on initial loading The `LinkBubbleView` is created and then mounted by `createTooltip` in the `update` function of the `LinkBubblePluginView`. This already happens during the initial rendering as that is the first time the editor content is updated. At this time the `href` is null and therefore `startEdit` is called which in turn sets the focus in the entry field. Instead set `edit` to `true` right away. The behavior of `mod-k` is still inconsistent. In particular it will not focus the link entry if the `href` already was falsy - for example right after the start. Signed-off-by: Max --- src/components/Link/LinkBubbleView.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Link/LinkBubbleView.vue b/src/components/Link/LinkBubbleView.vue index 5ed97243907..3874d38ee0d 100644 --- a/src/components/Link/LinkBubbleView.vue +++ b/src/components/Link/LinkBubbleView.vue @@ -153,7 +153,7 @@ export default { data() { return { isEditable: false, - edit: false, + edit: true, newHref: null, referenceTitle: null, } @@ -206,10 +206,6 @@ export default { }) }, - mounted() { - this.startEditIfEmpty() - }, - methods: { resetBubble() { this.edit = false