mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
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:
@@ -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?.(
|
||||
|
||||
Reference in New Issue
Block a user