Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select dropdown closed on scroll start #201

Open
hc42 opened this issue Mar 17, 2022 · 1 comment
Open

Select dropdown closed on scroll start #201

hc42 opened this issue Mar 17, 2022 · 1 comment

Comments

@hc42
Copy link

hc42 commented Mar 17, 2022

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.

@optimistex
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants