From 01bda605a7897a35e8e68f44d70edb804eeb417c Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Tue, 25 Jun 2019 21:31:43 +0300
Subject: fix all known problems with clicks on autocomplete emojis

---
 src/components/emoji-input/emoji-input.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/emoji-input/emoji-input.vue')

diff --git a/src/components/emoji-input/emoji-input.vue b/src/components/emoji-input/emoji-input.vue
index 8437a495..12d7d8a7 100644
--- a/src/components/emoji-input/emoji-input.vue
+++ b/src/components/emoji-input/emoji-input.vue
@@ -6,7 +6,7 @@
       <div
         v-for="(suggestion, index) in suggestions"
         :key="index"
-        @click.stop.prevent="replaceText"
+        @click.stop.prevent="(e) => onClick(e, suggestion)"
         class="autocomplete-item"
         :class="{ highlighted: suggestion.highlighted }"
         >
-- 
cgit v1.2.3-70-g09d2


From 82464b3a7efedd3bfee7f652c1465b386c3be1b9 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Wed, 26 Jun 2019 00:34:09 +0300
Subject: review

---
 src/components/emoji-input/emoji-input.js  | 3 ++-
 src/components/emoji-input/emoji-input.vue | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/components/emoji-input/emoji-input.vue')

diff --git a/src/components/emoji-input/emoji-input.js b/src/components/emoji-input/emoji-input.js
index dc16ba8a..cd0247df 100644
--- a/src/components/emoji-input/emoji-input.js
+++ b/src/components/emoji-input/emoji-input.js
@@ -60,7 +60,7 @@ const EmojiInput = {
       highlighted: 0,
       caret: 0,
       focused: false,
-      blurTimeout: false
+      blurTimeout: null
     }
   },
   computed: {
@@ -186,6 +186,7 @@ const EmojiInput = {
     onFocus (e) {
       if (this.blurTimeout) {
         clearTimeout(this.blurTimeout)
+        this.blurTimeout = null
       }
 
       this.focused = true
diff --git a/src/components/emoji-input/emoji-input.vue b/src/components/emoji-input/emoji-input.vue
index 12d7d8a7..b1f7afa5 100644
--- a/src/components/emoji-input/emoji-input.vue
+++ b/src/components/emoji-input/emoji-input.vue
@@ -6,7 +6,7 @@
       <div
         v-for="(suggestion, index) in suggestions"
         :key="index"
-        @click.stop.prevent="(e) => onClick(e, suggestion)"
+        @click.stop.prevent="onClick($event, suggestion)"
         class="autocomplete-item"
         :class="{ highlighted: suggestion.highlighted }"
         >
-- 
cgit v1.2.3-70-g09d2

