ngx-select-ex
ngx-select-ex copied to clipboard
Select dropdown closed on scroll start
trafficstars
Hi,
preconditions:
- appendTo option is used to position the dropdown menu outside
component - there are a few options so that a scroll area is displayed at the select options
Then the menu is closed when you try to click with the mouse cursor on the browser scroll wheel (at the ul element).
The cause is the @HostListener('document:focusin', ['$event']) in https://github.com/optimistex/ngx-select-ex/blob/master/src/app/lib/ngx-select/ngx-select.component.ts#L294 which closes the dropdown
A workaround is to add a focusin listener to the select options container (appendTo element) and prevent event propagation.
@hc42 Thanks for the report! Could you please prepare a Pull Request with a fix. So, I'd review and merge/release if it's possible.