chore: diable context menu for empty text

This commit is contained in:
nivedin
2024-02-22 15:01:16 +05:30
committed by Andrew Bastin
parent 9a2058bbec
commit aec04a13e3

View File

@@ -243,7 +243,7 @@ export function useCodemirror(
if (from === to) return
const text = view.value?.state.doc.sliceString(from, to)
const { top, left } = view.value?.coordsAtPos(from)
if (text) {
if (text && text.trim()) {
invokeAction("contextmenu.open", {
position: {
top,