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

Button width changed when switching loading state #4913

Closed
CodePlayer7 opened this issue Feb 16, 2017 · 15 comments
Closed

Button width changed when switching loading state #4913

CodePlayer7 opened this issue Feb 16, 2017 · 15 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@CodePlayer7
Copy link
Contributor

~

@benjycui
Copy link
Contributor

Yep, for IE9/10 doesn't support transition.

@benjycui
Copy link
Contributor

It will be better to write your issue/comment in English, so more people can understand you. And this means that more people can help you or benefit from your issue/comment.

@benjycui
Copy link
Contributor

antd uses transition and animation in many cases, so it is expensive and unnecessary to refactor to use JavaScript animation.

@CodePlayer7
Copy link
Contributor Author

my case comes under Chrome not IE~

@CodePlayer7 CodePlayer7 changed the title 按钮在切换loading状态的瞬间会改变宽度 Button width changed when switching loading state Feb 17, 2017
@benjycui
Copy link
Contributor

Please provide a re-producible demo: http://codepen.io/benjycui/pen/KgPZrE?editors=001

And steps to re-produce it, a GIF will be better.

@benjycui benjycui reopened this Feb 17, 2017
@CodePlayer7
Copy link
Contributor Author

@benjycui
Copy link
Contributor

Yep, the animation is weirdo when we use both of icon and loading.

@benjycui benjycui added 🐛 Bug Ant Design Team had proved that this is a bug. and removed 🙅🏻‍♀️ WON'T RESOLVE labels Feb 17, 2017
@afc163 afc163 closed this as completed in 8dc73f4 Feb 17, 2017
@afc163
Copy link
Member

afc163 commented Feb 17, 2017

@CallMeXYZ Thx for the codepen, that was helpful!

@CodePlayer7
Copy link
Contributor Author

how can we fix this in the current version?

@afc163
Copy link
Member

afc163 commented Feb 19, 2017

Override style in your css file like 8dc73f4 does. Or just wait for next patch.

@CodePlayer7
Copy link
Contributor Author

just write some dead override css like below, would it be no side effect?

.ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline) .anticon{
     transition: inherit;
 }
.anticon{
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)
}

@afc163
Copy link
Member

afc163 commented Feb 20, 2017

.ant-btn .anticon {
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

@CodePlayer7
Copy link
Contributor Author

2333 u should not use transition:none,take a try~

@afc163
Copy link
Member

afc163 commented Feb 20, 2017

I see... you are right

@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants