diff options
Diffstat (limited to 'server/sonar-web/src/main/js/components/docs/DocTooltip.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/docs/DocTooltip.tsx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/components/docs/DocTooltip.tsx b/server/sonar-web/src/main/js/components/docs/DocTooltip.tsx index a1cfb5d2150..d3f096a8957 100644 --- a/server/sonar-web/src/main/js/components/docs/DocTooltip.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocTooltip.tsx @@ -34,12 +34,11 @@ interface Props { interface State { content?: string; - open: boolean; } export default class DocTooltip extends React.PureComponent<Props, State> { mounted = false; - state: State = { open: false }; + state: State = {}; componentDidMount() { this.mounted = true; @@ -51,20 +50,12 @@ export default class DocTooltip extends React.PureComponent<Props, State> { }, () => {} ); - document.addEventListener('scroll', this.close, true); } componentWillUnmount() { this.mounted = false; - document.removeEventListener('scroll', this.close, true); } - close = () => { - if (this.mounted) { - this.setState({ open: false }); - } - }; - render() { return this.state.content ? ( <HelpTooltip |