From: David Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com> Date: Thu, 17 Nov 2022 10:26:45 +0000 (+0100) Subject: SONAR-17606 Comment popover should not close on mouse out (#7066) X-Git-Tag: 9.8.0.63668~111 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04d75741c1b20d0944d8907b4b2844cf7f19ca1b;p=sonarqube.git SONAR-17606 Comment popover should not close on mouse out (#7066) --- diff --git a/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx index 1fc09edfe05..b3af496dc47 100644 --- a/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx @@ -41,11 +41,11 @@ export default class OutsideClickHandler extends React.Component { } addClickHandler = () => { - window.addEventListener('click', this.handleWindowClick); + window.addEventListener('mousedown', this.handleWindowClick); }; removeClickHandler = () => { - window.removeEventListener('click', this.handleWindowClick); + window.removeEventListener('mousedown', this.handleWindowClick); }; handleWindowClick = (event: MouseEvent) => {