UX: prevents long press on reaction to open actions (#20899)

This is super hard to write a test as a combination of: long press, mobile and popup.
This commit is contained in:
Joffrey JAFFEUX
2023-03-30 20:01:38 +02:00
committed by GitHub
parent 2df0eca39a
commit 6ba24b3599
2 changed files with 6 additions and 0 deletions
@@ -1,6 +1,7 @@
{{#if (and @reaction this.emojiUrl)}}
<button
type="button"
{{on "touchstart" this.handleTouchStart}}
{{on "click" this.handleClick}}
tabindex="0"
class={{concat-class
@@ -45,6 +45,11 @@ export default class ChatMessageReaction extends Component {
return emojiUrlFor(this.args.reaction.emoji);
}
@action
handleTouchStart(event) {
event.stopPropagation();
}
@action
handleClick() {
this.args.react?.(