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

nz-anchor属性nzTarget不生效 #4553

Closed
winsee opened this issue Dec 12, 2019 · 0 comments · Fixed by #4877
Closed

nz-anchor属性nzTarget不生效 #4553

winsee opened this issue Dec 12, 2019 · 0 comments · Fixed by #4877

Comments

@winsee
Copy link

winsee commented Dec 12, 2019

Reproduction link

https://5tcfud.run.stackblitz.io

Steps to reproduce

1.滚动容器内部使用nz-anchor并设置 nzTarget 参数对这个容器使用固钉
2.滚动容器锚点并没有浮动

What is expected?

锚点正常浮动

What is actually happening?

锚点没有浮动

Environment Info
ng-zorro-antd 8.5.2
Browser chrome 78.0.3904.108

  • 代码如下
import { Component } from '@angular/core';
@Component({
  selector: 'nz-demo-anchor-basic',
  template: `
    <div style="height:300px; background-color: #f2f2f2; overflow: auto;" #out>
    <br /><br /><br />
    <nz-anchor [nzTarget]="out">
      <nz-link nzHref="#components-anchor-demo-basic" nzTitle="Basic demo"></nz-link>
      <nz-link nzHref="#components-anchor-demo-static" nzTitle="Static demo"></nz-link>
      <nz-link nzHref="#api" nzTitle="API">
        <nz-link nzHref="#nz-anchor" nzTitle="nz-anchor"></nz-link>
        <nz-link nzHref="#nz-link" nzTitle="nz-link"></nz-link>
      </nz-link>
    </nz-anchor>
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    </div>
  `
})
export class NzDemoAnchorBasicComponent {}
```<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Mar 13, 2020
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Mar 13, 2020
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Mar 15, 2020
vthinkxie pushed a commit that referenced this issue Mar 15, 2020
* refactor(module:anchor): refactor

close #4553

* refactor(module:anchor): use renderer to set classname

* fix(module:back-top): fix visible changes
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
* refactor(module:anchor): refactor

close NG-ZORRO#4553

* refactor(module:anchor): use renderer to set classname

* fix(module:back-top): fix visible changes
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
* refactor(module:anchor): refactor

close NG-ZORRO#4553

* refactor(module:anchor): use renderer to set classname

* fix(module:back-top): fix visible changes
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