From 4200b00c0472aead8998ce5a130847107620139e Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:54:32 +0530 Subject: [PATCH] fix: close context menu while scrolling (#4763) --- packages/hoppscotch-common/src/composables/codemirror.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-common/src/composables/codemirror.ts b/packages/hoppscotch-common/src/composables/codemirror.ts index 7aa5b1f4..42a8690a 100644 --- a/packages/hoppscotch-common/src/composables/codemirror.ts +++ b/packages/hoppscotch-common/src/composables/codemirror.ts @@ -358,8 +358,8 @@ export function useCodemirror( view.requestMeasure() if (event.target && options.contextMenuEnabled) { - // Debounce to make the performance better - debouncedTextSelection(30)() + // close the context menu when the editor is scrolled + closeContextMenu() } }, }),