Skip to content

A platform for community discussion. Free, open, simple.

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

Joffrey JAFFEUX5ec19987b4be
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