From e1dbac240af41755009dd609f487eafe9c417afc Mon Sep 17 00:00:00 2001 From: beo3000 Date: Thu, 26 Feb 2026 15:59:01 +0100 Subject: [PATCH] fix - bubble-menu --- ka-note/VERSION | 2 +- .../src/lib/components/MarkdownEditor.svelte | 9 ++++++++- ka-note/server/ka-note.db-shm | Bin 32768 -> 32768 bytes 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ka-note/VERSION b/ka-note/VERSION index 024b8c7..e452463 100644 --- a/ka-note/VERSION +++ b/ka-note/VERSION @@ -1 +1 @@ -1.1.78 \ No newline at end of file +1.1.79 \ No newline at end of file diff --git a/ka-note/client/src/lib/components/MarkdownEditor.svelte b/ka-note/client/src/lib/components/MarkdownEditor.svelte index 13dd4c5..e51f4b0 100644 --- a/ka-note/client/src/lib/components/MarkdownEditor.svelte +++ b/ka-note/client/src/lib/components/MarkdownEditor.svelte @@ -98,7 +98,14 @@ TableHeader, BubbleMenu.configure({ element: bubbleMenuEl, - shouldShow: ({ editor: e, from, to }) => from !== to && !e.isActive('image'), + tippyOptions: { duration: 100 }, + shouldShow: ({ editor: e, from, to, view }) => { + if (!view.hasFocus()) return false; + if (from === to) return false; + if (e.isActive('image')) return false; + const { empty } = e.state.selection; + return !empty; + }, }), ], content: initialContent, diff --git a/ka-note/server/ka-note.db-shm b/ka-note/server/ka-note.db-shm index a0ad9f0743deef8d4ed4ece65f401ea10cf2d580..6adaed67b2ed6ba5a359c37724bde238c5927d56 100644 GIT binary patch delta 55 ucmZo@U}|V!;*@x#%K!!wIpqZxMta8ETl}j*7GwnrPK;G%+`h4~z8(ODRu54C delta 55 vcmZo@U}|V!;*@x#%K!pQ6FKDtcSm~0XIlKLK^9~M3r>txX56r`vA!MvkzEhg