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:
parent
2df0eca39a
commit
6ba24b3599
|
@ -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?.(
|
||||
|
|
Loading…
Reference in New Issue