Skip to content

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

Open
rainke wants to merge 1 commit intoyiminghe:masterfrom
rainke:patch-1
Open

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

Conversation

@rainke
Copy link

@rainke rainke commented Sep 1, 2023

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

@yiminghe
Copy link
Owner

yiminghe commented Sep 1, 2023

需要一个出错例子。

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

@rainke
Copy link
Author

rainke commented Sep 1, 2023

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