From aec04a13e35c3aab2279ddf9547495dee63a616d Mon Sep 17 00:00:00 2001 From: nivedin Date: Thu, 22 Feb 2024 15:01:16 +0530 Subject: [PATCH] chore: diable context menu for empty text --- packages/hoppscotch-common/src/composables/codemirror.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hoppscotch-common/src/composables/codemirror.ts b/packages/hoppscotch-common/src/composables/codemirror.ts index 58f69e06a..8236a862a 100644 --- a/packages/hoppscotch-common/src/composables/codemirror.ts +++ b/packages/hoppscotch-common/src/composables/codemirror.ts @@ -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,