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 if (from === to) return
const text = view.value?.state.doc.sliceString(from, to) const text = view.value?.state.doc.sliceString(from, to)
const { top, left } = view.value?.coordsAtPos(from) const { top, left } = view.value?.coordsAtPos(from)
if (text) { if (text && text.trim()) {
invokeAction("contextmenu.open", { invokeAction("contextmenu.open", {
position: { position: {
top, top,