Boost能不能优化下回车发送机制

2026-04-29 08:582阅读0评论SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:

拼音的时候按回车就发出去了,我经常中英混打,输入英文的时候按回车,英文没输进入就发送出去了

建议前端监听 compositionstart/compositionend 标记输入法组合状态,只有在 !isComposing && Enter && !Shift 时才发送消息,否则让回车继续用于输入

网友解答:
--【壹】--:

其实有看到 pr,但是不知道官方为什么一直没处理

github.com/discourse/discourse-boosts

FIX: Word limit shouldn't break IME composition (#1)

mainsmall-lovely-cat:main 已打开 03:15AM - 08 Apr 26 UTC small-lovely-cat +19 -1

There exists a bug in discourse boost composer. For IME using language, like …Chinese, the original logic will stop the IME composition when the word is near the limit, causing the bug shown in the figure. This commit stops the cut when user is composing, while call the cut process after that. Before: https://github.com/user-attachments/assets/75445120-e20c-4858-b316-5bd6bc541ac3 After: https://github.com/user-attachments/assets/49e8cf55-0573-47e8-8861-54e9ea8d4b05


--【贰】--:

支持,改成 ctrl+enter 提交就好了


--【叁】--:

这是 Discourse 的原生功能,始皇应该不会改动的

打补丁吧,看看哈雷佬的帖子

Boost CJK 输入法回车上屏英文内容却直接发送的解决方案 开发调优
从私聊聊天优化建议继续讨论: 直接消息回车问题 - #7,来自 Haleclipse // ==UserScript== // @name Discourse Chat IME Guard // @namespace https://linux.do/ // @version 0.5 // @description Block IME Enter & fix …