lakejs / lake

Browser-based WYSIWYG editor
https://lakejs.org/
MIT License
11 stars 1 forks source link

段首\行首输入中文第一个字母会错误上屏 #8

Closed meng-fanlei closed 10 hours ago

meng-fanlei commented 5 days ago

比如在段首\行首输入nihao,第一个字母n会错误上屏,导致输入的文本与预期不同,并且该bug在Enter创建新段落和Shift+Enter换行后稳定触发。

luolonghao commented 4 days ago

输入文字就报错?你的操作系统和浏览器版本报一下

meng-fanlei commented 4 days ago

输入文字就报错?你的操作系统和浏览器版本报一下

操作系统:macOS 13.6.7 (22G720) 浏览器版本: Microsoft Edge 版本 126.0.2592.81 (正式版本) (x86_64) Google Chrome 版本 126.0.6478.127(正式版本) (x86_64) Safari 正常 演示效果: QQ20240702-下午54329

luolonghao commented 4 days ago

很神奇。我在 Windows 10 的 Edge 和 Chrome 上都没能复现。我再找找原因。

luolonghao commented 2 days ago

最新版本应该没问题了,帮忙在官网上的演示试试,谢谢。

meng-fanlei commented 2 days ago

macOS测试该问题已修复,但输入中文的时候按回车的问题依然存在。 在edge浏览器会添加新的段落,在firefox浏览器回车输入后光标会跳到输入的内容的前方(这个仅在鼠须管输入法触发,应该是输入法的问题)。

luolonghao commented 10 hours ago

MacOS 上输入中文,拼音状态下回车,代码再加了判断,现在没问题了。MacOS 上的 Firefox 也用 QQ 输入法没问题。特定输入法问题暂时不处理。

https://github.com/lakejs/lake/commit/f96aa4763078e448fc7fd15fdf57a50ec44277b4