Skip to content

fix: Ensure that the ancestor element is in the dom tree#76

Open
rainke wants to merge 1 commit into
yiminghe:masterfrom
rainke:patch-1
Open

fix: Ensure that the ancestor element is in the dom tree#76
rainke wants to merge 1 commit into
yiminghe:masterfrom
rainke:patch-1

Conversation

@rainke

@rainke rainke commented Sep 1, 2023

Copy link
Copy Markdown

some lib(https://www.npmjs.com/package/vue-frag)will create fake parentNode for element

@yiminghe

yiminghe commented Sep 1, 2023

Copy link
Copy Markdown
Owner

需要一个出错例子。

另外直接在 getVisibleRectForElement 函数开头判断是不是就行了,不进入 while

@rainke

rainke commented Sep 1, 2023

Copy link
Copy Markdown
Author

https://github.com/rainke/align-demo

vue-frag 导致其 child 的 parentNode 是一个不在文档流的元素, 需要跳过继续找祖先元素

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

Successfully merging this pull request may close these issues.

2 participants