FIX: attempts to fix a regression making touchs on emojis less reliable (#7383)

FIX: attempts to fix a regression making touchs on emojis less reliable (#7383)

diff --git a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 b/app/assets/javascripts/discourse/components/emoji-picker.js.es6
index 144da9b..1f949d8 100644
--- a/app/assets/javascripts/discourse/components/emoji-picker.js.es6
+++ b/app/assets/javascripts/discourse/components/emoji-picker.js.es6
@@ -360,12 +360,16 @@ export default Ember.Component.extend({
         .off("touchstart")
         .on("touchstart", "button.emoji", touchStartEvent => {
           const $this = $(touchStartEvent.currentTarget);
+
           $this.on("touchend", touchEndEvent => {
+            touchEndEvent.preventDefault();
+            touchEndEvent.stopPropagation();
+
             handler.bind(self)(touchEndEvent);
             $this.off("touchend");
           });
+
           $this.on("touchmove", () => $this.off("touchend"));
-          return false;
         });
     } else {
       $emojisContainer

GitHub sha: 5ec19987

1 Like