Repository navigation
Commit 8970520
committed
fix: skip preventDefault on scrollbar mousedown in version combobox
The onMouseDown handler on the <ul> popup called preventDefault()
unconditionally. In Chromium and Safari, mousedown on a scrollbar
targets the scrollable element, so preventDefault cancelled native
scrollbar drag/jump when versions overflowed max-height.
Only call preventDefault when the target is a descendant (a list item),
not the <ul> itself. When event.target === event.currentTarget the click
hit the scrollbar track or padding, and the <ul> is not focusable so
focus stays in the input without intervention.1 parent 2fc3d34 commit 8970520
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
275 | 278 | | |
276 | 279 | | |
277 | 280 | | |
| |||
0 commit comments