add select check to fix edge wave issue (#14469)

* add select check to fix edge wave issue
fix #14466

* update style

* add comment

* rm removeAttribute
This commit is contained in:
zombieJ 2019-01-22 16:23:59 +08:00 committed by GitHub
parent 16ec6e954e
commit 0e8e2b53e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -41,7 +41,6 @@ export default class Wave extends React.Component<{ insertExtraNode?: boolean }>
const extraNode = this.extraNode;
extraNode.className = 'ant-click-animating-node';
const attributeName = this.getAttributeName();
node.removeAttribute(attributeName);
node.setAttribute(attributeName, 'true');
// Not white or transparnt or grey
styleForPesudo = styleForPesudo || document.createElement('style');
@ -54,7 +53,7 @@ export default class Wave extends React.Component<{ insertExtraNode?: boolean }>
waveColor !== 'transparent'
) {
extraNode.style.borderColor = waveColor;
styleForPesudo.innerHTML = `[ant-click-animating-without-extra-node]:after { border-color: ${waveColor}; }`;
styleForPesudo.innerHTML = `[ant-click-animating-without-extra-node="true"]:after { border-color: ${waveColor}; }`;
if (!document.body.contains(styleForPesudo)) {
document.body.appendChild(styleForPesudo);
}
@ -115,7 +114,7 @@ export default class Wave extends React.Component<{ insertExtraNode?: boolean }>
}
const { insertExtraNode } = this.props;
const attributeName = this.getAttributeName();
node.removeAttribute(attributeName);
node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466
this.removeExtraStyleNode();
if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
node.removeChild(this.extraNode);

View File

@ -4,12 +4,12 @@
}
}
[ant-click-animating],
[ant-click-animating-without-extra-node] {
[ant-click-animating='true'],
[ant-click-animating-without-extra-node='true'] {
position: relative;
}
[ant-click-animating-without-extra-node]:after,
[ant-click-animating-without-extra-node='true']:after,
.ant-click-animating-node {
content: '';
position: absolute;