Skip to content

Commit c3a84d4

Browse files
fix(ui): fix cursor is gone on mouse-click a suggestion
1 parent e9a3081 commit c3a84d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web/src/components/MemoEditor/Editor/SuggestionsPopup.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export function SuggestionsPopup<T>({
4242
<div
4343
key={getItemKey(item, i)}
4444
ref={i === selectedIndex ? selectedItemRef : null}
45-
onMouseDown={() => onItemSelect(item)}
45+
onMouseDown={(e) => {
46+
onItemSelect(item);
47+
e.preventDefault();
48+
}}
4649
className={cn(
4750
"rounded p-1 px-2 w-full text-sm cursor-pointer transition-colors select-none",
4851
"hover:bg-accent hover:text-accent-foreground",

0 commit comments

Comments
 (0)