当启用“启用新帖子反应菜单”时存在一个 bug,左侧的 discourse-reactions-actions-x-left 和 discourse-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