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

[Component] [anchor] anchor在最底部高度不足的情况下,无法滑动到最后的条目 #16698

Closed
singlerace opened this issue Apr 29, 2024 · 6 comments

Comments

@singlerace
Copy link

Snipaste_2024-04-29_10-09-36

Bug Type: Component

Environment

  • Vue Version: 3.4.25
  • Element Plus Version: 2.7.2
  • Browser / OS: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0
  • Build Tool: Vite

Reproduction

Related Component

  • el-anchor

Reproduction Link

Github Repo

Steps to reproduce

anchor在最底部高度不足时,无法滑动到最后的条目,element plus的官网也是这种情况

What is Expected?

anchor可以将选中条目滑动到最后一个

What is actually happening?

底部高度不足时,anchor的选中条目不能滑动到最后一个条目

Additional comments

(empty)

image

@kooriookami
Copy link
Member

是的,这个是根据顶部计算的

@singlerace
Copy link
Author

是的,这个是根据顶部计算的

那这不算bug吗?

@kooriookami
Copy link
Member

不算bug呀,确实没滚动到对应位置。

@singlerace
Copy link
Author

singlerace commented Apr 30, 2024

image
vue的官网可以在高度不足的情况下滚动到最后一个条目,感觉这样更符合正常情况

@kooriookami
Copy link
Member

QQ2024430-102649-HD.mp4

我看了一下,vue的页面滚动到底就强制把锚点高亮最后一个。但是中间的锚点就会有问题了,看上面视频倒数第二个锚点被跳过了。

@singlerace
Copy link
Author

QQ2024430-102649-HD.mp4
我看了一下,vue的页面滚动到底就强制把锚点高亮最后一个。但是中间的锚点就会有问题了,看上面视频倒数第二个锚点被跳过了。

还真没注意,感谢解答

@chenxch chenxch closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
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

3 participants