ngx-select-ex icon indicating copy to clipboard operation
ngx-select-ex copied to clipboard

Select dropdown closed on scroll start

Open hc42 opened this issue 3 years ago • 1 comments
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 avatar Mar 17 '22 14:03 hc42

@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.

optimistex avatar Mar 17 '22 14:03 optimistex