fix: close context menu while scrolling (#4763)

This commit is contained in:
Nivedin 2025-02-19 15:54:32 +05:30 committed by GitHub
parent bb36d32359
commit 4200b00c04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}
},
}),