From af9b34a1c6bd53f9f26b194fe3c970d72db9c83d Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Tue, 2 Jan 2024 16:25:50 +0100 Subject: [PATCH] Revert "Prevent scrollbar click to close modal (#3651)" (#3664) This reverts commit 75a7ef52410b7ffa8bc373eeb74f335d7a296918. --- assets/js/dashboard/stats/modals/modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/dashboard/stats/modals/modal.js b/assets/js/dashboard/stats/modals/modal.js index b30ec5140..4b031f360 100644 --- a/assets/js/dashboard/stats/modals/modal.js +++ b/assets/js/dashboard/stats/modals/modal.js @@ -24,7 +24,7 @@ class Modal extends React.Component { componentDidMount() { document.body.style.overflow = 'hidden'; document.body.style.height = '100vh'; - document.addEventListener("click", this.handleClickOutside); + document.addEventListener("mousedown", this.handleClickOutside); document.addEventListener("keyup", this.handleKeyup); window.addEventListener('resize', this.handleResize, false); this.handleResize(); @@ -33,7 +33,7 @@ class Modal extends React.Component { componentWillUnmount() { document.body.style.overflow = null; document.body.style.height = null; - document.removeEventListener("click", this.handleClickOutside); + document.removeEventListener("mousedown", this.handleClickOutside); document.removeEventListener("keyup", this.handleKeyup); window.removeEventListener('resize', this.handleResize, false); }