dream-num / univer

Univer is an open-source alternative to Google Sheets, Slides, and Docs
https://univer.ai
Apache License 2.0
6.01k stars 495 forks source link

[Bug] 编辑单元格内容时,使用左右键移动光标,直接失焦了 #1549

Closed codebabydxj closed 4 months ago

codebabydxj commented 4 months ago

在您提交此问题之前,您是否检查了以下内容?

受影响的包和版本

0.1.2

复现链接

https://sheetsvitedemo-s2r2--5173--dc33e3af.local-credentialless.webcontainer.io

预期行为

已经获取焦点,键入值的时候可以使用键盘左右键移动光标

实际行为

输入值之后,左右移动光标修改值时, 光标失焦;

运行环境

No response

系统信息

No response

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Before you submitted this question, did you check the following?

Affected packages and versions

0.1.2

Recurrence link

https://sheetsvitedemo-s2r2--5173--dc33e3af.local-credentialless.webcontainer.io

Expected behavior

Focus has been obtained. When typing a value, you can use the left and right keys of the keyboard to move the cursor.

Actual behavior

After entering the value, when moving the cursor left or right to modify the value, the cursor is out of focus;

Running environment

No response

system message

No response

jikkai commented 4 months ago

The behavior is intentional and matches the expected functionality as seen in Excel.

https://github.com/dream-num/univer/assets/14025786/f1d64df3-3f87-4660-9b02-8868ca681158

Yang-yibu commented 4 months ago

不是吧,或者是有什么设置吧。我用 wps 测试是未失焦状态。我觉得不失焦更合理,不然还需好用鼠标确定光标位置,用户如果想失焦退出编辑状态,可以按Esc等退出键。

univer-bot[bot] commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

No, maybe there is some setting. I used wps to test that it was not out of focus. I think it is more reasonable not to lose focus, otherwise you need to use the mouse to determine the cursor position. If the user wants to lose focus and exit the editing state, he can press Esc or other exit keys.

Yang-yibu commented 4 months ago

动画1

univer-bot[bot] commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Animation 1