Commit 304d28b
Fix sidebar Enter/o not focusing the note list on filtered views
Two issues:
1. Pressing Enter on sidebar filter buttons (Todo, Pinned, etc.)
triggered both the keyboard nav handler (focus notes pane) and the
button's native Enter→click (re-select filter, set focus back to
sidebar). Fix: prevent default Enter/Space on filter buttons so
the nav handler controls focus exclusively.
2. When the selected note wasn't in the current filtered list (e.g.
selected from All Notes, then switched to Todo), the notes pane
handler tried to focus a non-existent row and fell back to focusing
the scroll container. Fix: detect the mismatch and fall back to
selecting the first visible note instead. Also removed the scroll
container focus fallback entirely — if no note row exists to focus,
do nothing since focusedPane store state handles keyboard routing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dbca18a commit 304d28b
3 files changed
Lines changed: 41 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | 155 | | |
157 | | - | |
158 | | - | |
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
264 | 275 | | |
265 | 276 | | |
266 | 277 | | |
| |||
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| 283 | + | |
272 | 284 | | |
| 285 | + | |
273 | 286 | | |
274 | 287 | | |
275 | 288 | | |
| |||
283 | 296 | | |
284 | 297 | | |
285 | 298 | | |
286 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
53 | 66 | | |
54 | 67 | | |
55 | 68 | | |
| |||
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
| |||
186 | 200 | | |
187 | 201 | | |
188 | 202 | | |
| 203 | + | |
189 | 204 | | |
190 | 205 | | |
191 | 206 | | |
| |||
207 | 222 | | |
208 | 223 | | |
209 | 224 | | |
| 225 | + | |
210 | 226 | | |
211 | 227 | | |
212 | 228 | | |
| |||
222 | 238 | | |
223 | 239 | | |
224 | 240 | | |
| 241 | + | |
225 | 242 | | |
226 | 243 | | |
227 | 244 | | |
| |||
241 | 258 | | |
242 | 259 | | |
243 | 260 | | |
| 261 | + | |
244 | 262 | | |
245 | 263 | | |
246 | 264 | | |
| |||
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| 278 | + | |
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
| |||
0 commit comments