Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/ui-select/src/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ tags: autocomplete, typeahead, combobox, dropdown, search, form
@testable()
class Select extends Component<SelectProps> {
static readonly componentId = 'Select'
private readonly SCROLL_TOLERANCE = 0.5

static allowedProps = allowedProps
static propTypes = propTypes
Expand Down Expand Up @@ -527,7 +528,10 @@ class Select extends Component<SelectProps> {
display: 'block',
overflowY: 'auto',
maxHeight:
optionsMaxHeight || this._optionHeight * visibleOptionsCount!,
optionsMaxHeight ||
this._optionHeight * visibleOptionsCount! -
// in Chrome, we need to prevent scrolling when the bottom area of last item is hovered
(utils.isChromium() ? this.SCROLL_TOLERANCE : 0),
Comment on lines +533 to +534

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to prevent this, I clipped the bottom of the listbox by 0.5px.

maxWidth: optionsMaxWidth || this.width,
background: 'primary',
elementRef: (node: Element | null) => (this._listView = node),
Expand Down
Loading