Skip to content

Commit 19e3d2e

Browse files
fix: Suggestion menu closing when clicking scroll bar(#1899)
1 parent 295bd3d commit 19e3d2e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/react/src/components/SuggestionMenu/SuggestionMenuController.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,13 @@ export function SuggestionMenuController<
147147
}
148148

149149
return (
150-
<div ref={ref} style={style} {...getFloatingProps()}>
150+
<div
151+
ref={ref}
152+
style={style}
153+
{...getFloatingProps()}
154+
// Prevents editor blurring when clicking the scroll bar.
155+
onMouseDown={(e) => e.preventDefault()}
156+
>
151157
<SuggestionMenuWrapper
152158
query={state.query}
153159
closeMenu={callbacks.closeMenu}

0 commit comments

Comments
 (0)