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

Affix在触发resize后将丢失placeholder的高度 #3040

Closed
zd5043039119 opened this issue Mar 7, 2019 · 1 comment
Closed

Affix在触发resize后将丢失placeholder的高度 #3040

zd5043039119 opened this issue Mar 7, 2019 · 1 comment
Assignees

Comments

@zd5043039119
Copy link
Contributor

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-rkjxji

Steps to reproduce

页面加载完成后随意的resize浏览器或者打开console

What is expected?

两个div保持原状

What is actually happening?

绿色div会和红色div重合,如果触发scroll事件的话可以还原,但是如果正好缩小浏览器再全屏以后导致页面不足一屏,导致没有滚轮,就再也无法还原

Environment Info
ng-zorro-antd 7.0.1
Browser Chrome 版本 72.0.3626.121(正式版本) (64 位)

此问题出现在#2818 提交之后,由于触发resize后syncPlaceholderStyle只重新计算了placeholder的宽度导致

@ng-zorro-bot
Copy link
Collaborator

Translation of this issue:


Affix will lose the height of the placeholder after triggering resize

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-rkjxji

Steps to reproduce

After the page is loaded, feel free to resize the browser or open the console.

What is expected?

Two divs remain intact

What is actually happening?

The green div will coincide with the red div. If the scroll event is triggered, it can be restored. However, if the browser is reduced to full screen and the page is less than one screen, resulting in no scroll wheel, it can no longer be restored.

Environment Info
ng-zorro-antd 7.0.1
Browser Chrome version 72.0.3626.121 (official version) (64-bit)

This problem occurs after the #2818 commit, since the syncPlaceholderStyle only recalculates the width of the placeholder after the resize is triggered.

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

No branches or pull requests

4 participants