From 083b96a5040ccc71d2c0fc13e374d19ad2454161 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sun, 27 Mar 2022 08:54:37 +1100
Subject: Fix close-button unreliability bug

---
 src/components/HelpModal.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/HelpModal.vue')

diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue
index e76254d..3fb68ab 100644
--- a/src/components/HelpModal.vue
+++ b/src/components/HelpModal.vue
@@ -7,7 +7,7 @@ export default defineComponent({
 	},
 	methods: {
 		closeClicked(evt: Event){
-			if (evt.target == this.$el || evt.target == this.$refs.closeIcon){
+			if (evt.target == this.$el || this.$refs.closeIcon.contains(evt.target)){
 				this.$emit('help-modal-close');
 			}
 		},
@@ -20,7 +20,7 @@ export default defineComponent({
 <div class="fixed left-0 top-0 w-full h-full bg-black/40" @click="closeClicked">
 	<div class="absolute left-1/2 -translate-x-1/2 w-4/5 top-1/2 -translate-y-1/2 p-4
 		bg-stone-50 rounded-md shadow shadow-black">
-		<svg class="block absolute top-2 right-2 w-6 h-6 hover:cursor-pointer" @click="closeClicked" ref="closeIcon">
+		<svg class="block absolute top-2 right-2 w-6 h-6 hover:cursor-pointer" @click.stop="closeClicked" ref="closeIcon">
 			<use href="#svg-close"/>
 		</svg>
 		<h1 class="text-center text-xl font-bold mb-2">Help Info</h1>
-- 
cgit v1.2.3

