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

[Bug] select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 #2034

Closed
1-2-3 opened this issue Aug 24, 2018 · 2 comments · Fixed by #2741
Closed

Comments

@1-2-3
Copy link

1-2-3 commented Aug 24, 2018

Version
1.4.0

Environment
Win10,Chrome 66.0.3359.117,screen resolution 1920*1080 zoom to 125%

Reproduction link
https://stackblitz.com/edit/ng-zorro-antd-start-njn3wk

Steps to reproduce

  1. Select componnet bind 10 options (must 10 items!)
  2. use screen resolution 1920*1080 zoom to 125%
  3. drop down select items and scroll to bottom, and nzScrollToBottom not emited.
  4. bind 15 items or 25 items no problem. when 10 or 20 items nzScrollToBottom not emited. when screen not zoomed no problem.

What is expected?
nzScrollToBottom event emited

What is actually happening?
nzScrollToBottom not emited

Other?
when screen zoom, scrollTop has decimal part,nzScrollToBottom not emited

@1-2-3 1-2-3 changed the title Select componnet nzScrollToBottom event not emited when screen zoom to 150% and data count 10 Select componnet nzScrollToBottom event not emited when screen zoom to 125% and data count 10 Aug 26, 2018
@1-2-3 1-2-3 changed the title Select componnet nzScrollToBottom event not emited when screen zoom to 125% and data count 10 Select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 Aug 28, 2018
@1-2-3 1-2-3 changed the title Select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 Aug 28, 2018
@1-2-3 1-2-3 changed the title select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 [Bug] select: nzScrollToBottom event not emited when screen zoom to 125% and data count 10 Aug 31, 2018
@1-2-3
Copy link
Author

1-2-3 commented Sep 8, 2018

temporary solution:
modify \node_modules\ng-zorro-antd\esm5\antd.js line 5353
NzOptionContainerComponent.prototype.dropDownScroll method:
if (ul && (ul.scrollHeight - ul.scrollTop === ul.clientHeight)) {

to:
if (ul && (ul.scrollHeight - Math.ceil(ul.scrollTop) === ul.clientHeight)) {

@1-2-3
Copy link
Author

1-2-3 commented Feb 15, 2019

Thanks for the excellent work!

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

Successfully merging a pull request may close this issue.

3 participants