Skip to content

Commit

Permalink
Merge pull request ant-design#16063 from gxvv/master
Browse files Browse the repository at this point in the history
fix: loading circle button can handle pointer events.
  • Loading branch information
afc163 authored Apr 14, 2019
2 parents fc83789 + 9d95429 commit a091c72
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/button/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ exports[`renders ./components/button/demo/icon.md correctly 1`] = `
`;

exports[`renders ./components/button/demo/loading.md correctly 1`] = `
<span>
<div>
<button
class="ant-btn ant-btn-primary ant-btn-loading"
type="button"
Expand Down Expand Up @@ -746,7 +746,7 @@ exports[`renders ./components/button/demo/loading.md correctly 1`] = `
</svg>
</i>
</button>
</span>
</div>
`;

exports[`renders ./components/button/demo/multiple.md correctly 1`] = `
Expand Down
4 changes: 2 additions & 2 deletions components/button/demo/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class App extends React.Component {

render() {
return (
<span>
<div>
<Button type="primary" loading>
Loading
</Button>
Expand All @@ -49,7 +49,7 @@ class App extends React.Component {
<br />
<Button shape="circle" loading />
<Button type="primary" shape="circle" loading />
</span>
</div>
);
}
}
Expand Down
7 changes: 5 additions & 2 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,17 @@
}
}

&&-loading {
position: relative;
pointer-events: none;
}

&&-loading::before {
display: block;
}

&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
position: relative;
padding-left: 29px;
pointer-events: none;
.@{iconfont-css-prefix}:not(:last-child) {
margin-left: -14px;
}
Expand Down

0 comments on commit a091c72

Please sign in to comment.