From 5ec19987b4bec67f73c79207ee5673e52d373b6d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 16 Apr 2019 12:31:33 +0200 Subject: [PATCH] FIX: attempts to fix a regression making touchs on emojis less reliable (#7383) --- .../javascripts/discourse/components/emoji-picker.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 b/app/assets/javascripts/discourse/components/emoji-picker.js.es6 index 144da9b13f0..1f949d8b07a 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