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

Autocomplete dropdown closes if scrollbar is dragged on IE11 #4333

Closed
cnotv opened this issue Oct 22, 2019 · 1 comment
Closed

Autocomplete dropdown closes if scrollbar is dragged on IE11 #4333

cnotv opened this issue Oct 22, 2019 · 1 comment
Assignees
Labels
Component: AutoComplete 👨‍🏭 Some one working on this A community member has started working on this

Comments

@cnotv
Copy link

cnotv commented Oct 22, 2019

Reproduction link

https://stackblitz.com/edit/angular-hzqs6m?file=src/app/app.component.ts

Steps to reproduce

  • Click in the input field to display the dropdown (focus)
  • Try to drag the scrolling bar
  • The dropdown closes instead of allowing us to scroll

What is expected?

It is possible to scroll.

What is actually happening?

The dropdown closes.

Environment Info
ng-zorro-antd 8.4.0
Browser IE11

It does not happen to the other dropdowns, e.g. Select inputs.
I guess must be changed the closing event to the single option, rather than the whole dropdown.

@cnotv
Copy link
Author

cnotv commented Dec 6, 2019

I've been forced to create a directive with the same selector which on keydown/focus add a listener to prevent the blur of the element and on blur to remove it.
However has not been possible to solve it using the ElementRef, nor using the querySelector.
Instead I'd to brutally hack it with

window.addEventListener('blur', preventAll, true)

where preventAll is a function which ... prevents all :)

I will consider to create a PR.

hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Dec 11, 2019
@wenqi73 wenqi73 added the 👨‍🏭 Some one working on this A community member has started working on this label Jan 6, 2020
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
…ZORRO#4551)

* fix(module:auto-complete): close the panel when tapping scrollbar on Windows

close NG-ZORRO#4333

* test: fix test
@hsuanxyz hsuanxyz mentioned this issue Apr 15, 2020
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…ZORRO#4551)

* fix(module:auto-complete): close the panel when tapping scrollbar on Windows

close NG-ZORRO#4333

* test: fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: AutoComplete 👨‍🏭 Some one working on this A community member has started working on this
Projects
None yet
Development

No branches or pull requests

3 participants