Skip to content

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Oct 26, 2017

Fix tab active ink bar is rendered too long, when initialize, usually happend with css-loader

close ant-design/ant-design#7564
close ant-design/ant-design#8000
close ant-design/ant-design#8001
close ant-tool/atool-doc#40
close dvajs/dva#1300

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.0%) to 56.41% when pulling fdf7858 on fix-active-bar-render-bug into 8802ea9 on master.

@afc163 afc163 merged commit 5aa522a into master Oct 26, 2017
@afc163 afc163 deleted the fix-active-bar-render-bug branch October 26, 2017 14:52
// If there is no css rendered, don't generate the ink bar
// fix https://github.com/ant-design/ant-design/issues/8001
if (document.styleSheets.length === 0 ||
(document.styleSheets.length === 1 && document.styleSheets[0].rules.length === 0)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里或者应该用 document.styleSheets.every(s => s.rules.length === 0) ??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document.styleSheets 不是一个数组

@afc163
Copy link
Member Author

afc163 commented Oct 27, 2017

Reverted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants