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

createTextNode 一个空字符串节点时,会占位 16 px 的高度 #46

Closed
answershuto opened this issue Mar 15, 2021 · 3 comments · Fixed by #52
Closed

createTextNode 一个空字符串节点时,会占位 16 px 的高度 #46

answershuto opened this issue Mar 15, 2021 · 3 comments · Fixed by #52
Assignees
Labels
bug Something isn't working

Comments

@answershuto
Copy link
Member

No description provided.

@answershuto
Copy link
Member Author

answershuto commented Mar 15, 2021

case:

const child = document.createElement('div');
child.style.width = '10px';
child.style.height = '10px';
child.style.backgroundColor = 'blue';
document.body.appendChild(child);
document.body.appendChild(document.createTextNode(""));

const child2 = document.createElement('div');
child2.style.width = '10px';
child2.style.height = '10px';
child2.style.backgroundColor = 'yellow';
document.body.appendChild(child2);

@yuanyan
Copy link
Contributor

yuanyan commented Mar 15, 2021

没看明白,是需要实现 feature 还是 fix bug?

@answershuto
Copy link
Member Author

@yuanyan fix bug,与浏览器表现不一致

kraken

web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants