From 04d75741c1b20d0944d8907b4b2844cf7f19ca1b Mon Sep 17 00:00:00 2001 From: David Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com> Date: Thu, 17 Nov 2022 11:26:45 +0100 Subject: [PATCH] SONAR-17606 Comment popover should not close on mouse out (#7066) --- .../src/main/js/components/controls/OutsideClickHandler.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) => { -- 2.39.5