diff --git a/plugins/talk-plugin-permalink/client/components/PermalinkButton.js b/plugins/talk-plugin-permalink/client/components/PermalinkButton.js index 6a92d69ce..7eba9ddd0 100644 --- a/plugins/talk-plugin-permalink/client/components/PermalinkButton.js +++ b/plugins/talk-plugin-permalink/client/components/PermalinkButton.js @@ -48,7 +48,7 @@ export default class PermalinkButton extends React.Component { }); } - setTimeout(() => { + this.timeout = window.setTimeout(() => { this.setState({ copyFailure: null, copySuccessful: null @@ -56,6 +56,10 @@ export default class PermalinkButton extends React.Component { }, 3000); } + componentWillUnmount() { + window.clearTimeout(this.timeout); + } + render () { const {copySuccessful, copyFailure, popoverOpen} = this.state; const {asset} = this.props; diff --git a/plugins/talk-plugin-permalink/client/components/styles.css b/plugins/talk-plugin-permalink/client/components/styles.css index 6401dbece..56d069755 100644 --- a/plugins/talk-plugin-permalink/client/components/styles.css +++ b/plugins/talk-plugin-permalink/client/components/styles.css @@ -2,7 +2,6 @@ display: none; background-color: white; position: absolute; - border-radius: 3px; padding: 15px 10px; box-sizing: border-box;