Skip to content

position: sticky 时可视区域检测不准确 #51

@ding-js

Description

@ding-js

如果把元素粘贴在底部

position: sticky;
bottom: 0;

在未拖动到底部时的效果和 fixed 类似,但是库是按照正常文档流来处理的,导致在向下滚动的时候 Popup 一直不可见

Codepen 重现 Demo

sticky

if (isAncestorFixed(element)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions