]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17606 Comment popover should not close on mouse out (#7066)
authorDavid Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com>
Thu, 17 Nov 2022 10:26:45 +0000 (11:26 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 17 Nov 2022 20:03:07 +0000 (20:03 +0000)
server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx

index 1fc09edfe054fce9630e53d15d71a15a8cda363e..b3af496dc47f7d313db34e81545cea98bb71bcce 100644 (file)
@@ -41,11 +41,11 @@ export default class OutsideClickHandler extends React.Component<Props> {
   }
 
   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) => {