修复:长按反应计数器不应打开反应选择器

当启用“启用新帖子反应菜单”时存在一个 bug,左侧的 discourse-reactions-actions-x-leftdiscourse-reactions-reaction-button 共享同一个组件。

在移动端视图中,长按左侧的 discourse-reactions-actions-x-left 会意外触发 ReactionsPicker,控制台报错 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getBoundingClientRect'),且选择面板无响应。

此提交将事件绑定到元素 .discourse-reactions-reaction-button 上,以防止此类问题。

修复前:

修复后:

在 Meta 上:

类似问题参见此处,已添加引用:Ability to display all the likes/reactions on a post - #77 by Moin

相关 PR 在此:FIX: long pressing reactions-counter shouldn't open ReactionsPicker · Pull Request #39774 · discourse/discourse

另外,请花时间确认以下内容是否有效:

以及: