Commit 4a1c42a
🐛 fix: topic renaming input focus issue in context menu (lobehub#11323)
Fixes LOBE-2838
This commit resolves the issue where the input field wasn't properly focused when renaming topics through the context menu.
Changes:
- Created FocusableInput component that ensures input focus using queueMicrotask
- Replaced autoFocus prop with proper ref-based focus management
- Simplified onBlur handler logic
- Removed duplicate toggleEditing call from handleUpdate
The queueMicrotask approach ensures the focus happens after the Popover has fully rendered and positioned itself.1 parent bc3a7da commit 4a1c42a
File tree
1 file changed
+18
-9
lines changed- src/app/[variants]/(main)/chat/_layout/Sidebar/Topic/List/Item
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
12 | 25 | | |
13 | 26 | | |
14 | 27 | | |
| |||
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
44 | | - | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
50 | | - | |
51 | | - | |
| 62 | + | |
52 | 63 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
0 commit comments