Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: close context menu while scrolling (#4763)

Nivedin4200b00c0472
diff --git a/packages/hoppscotch-common/src/composables/codemirror.ts b/packages/hoppscotch-common/src/composables/codemirror.ts
index 7aa5b1f4c..42a8690a5 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()
}
},
}),