Commit dc30c09
authored
Only register an option once in strict mode (#3692)
I'm not 100% sure this is the right fix but it _does_ fix keyboard
navigation in listbox and menu when using strict mode.
Basically the same items/options are being registered more than once and
that causes the arrow up/down logic to only advance on every other
keypress.1 parent 51775d2 commit dc30c09
File tree
2 files changed
+19
-4
lines changed- packages/@headlessui-react/src/components
- listbox
2 files changed
+19
-4
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
429 | 431 | | |
430 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
431 | 437 | | |
432 | | - | |
| 438 | + | |
| 439 | + | |
433 | 440 | | |
434 | 441 | | |
435 | 442 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | | - | |
372 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| |||
0 commit comments