From fa7065c5b3cb317f8a0ea6805cb3b4b023782ef9 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 6c355d9ece1..75a01551340 100644 --- a/src/components/Link/LinkBubbleView.vue +++ b/src/components/Link/LinkBubbleView.vue @@ -148,7 +148,7 @@ export default { data() { return { isEditable: false, - edit: false, + edit: true, newHref: null, referenceTitle: null, } @@ -201,10 +201,6 @@ export default { }) }, - mounted() { - this.startEditIfEmpty() - }, - methods: { t,