From 3d28a3a405273d8416ddc8976aaaff0c90ac057d Mon Sep 17 00:00:00 2001
From: siikamiika <siikamiika@users.noreply.github.com>
Date: Sat, 31 Aug 2019 16:35:25 +0300
Subject: prevent closing new child popup on parent mouseout

---
 ext/fg/js/frontend.js | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'ext/fg/js')

diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 1dff6fb9..a31bdf79 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -56,6 +56,7 @@ class Frontend {
             window.addEventListener('mousedown', this.onMouseDown.bind(this));
             window.addEventListener('mousemove', this.onMouseMove.bind(this));
             window.addEventListener('mouseover', this.onMouseOver.bind(this));
+            window.addEventListener('mouseout', this.onMouseOut.bind(this));
             window.addEventListener('mouseup', this.onMouseUp.bind(this));
             window.addEventListener('resize', this.onResize.bind(this));
 
@@ -149,6 +150,10 @@ class Frontend {
         }
     }
 
+    onMouseOut(e) {
+        this.popupTimerClear();
+    }
+
     onFrameMessage(e) {
         const handlers = {
             popupClose: () => {
-- 
cgit v1.2.3