Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCursorPosition 针对空行会得到错误数据 #486

Merged
merged 2 commits into from Jun 13, 2020

Conversation

zTree
Copy link
Contributor

@zTree zTree commented Jun 12, 2020

fixed issue:Enter 键 或 删除时,有可能产生没有
的空行,这时候执行 getCursorPosition 会得到 {0,0} 从而导致得到的光标位置错误

@Vanessa219
Copy link
Owner

我已经看不懂写的啥了,稍后合并

@zTree
Copy link
Contributor Author

zTree commented Jun 12, 2020

@Vanessa219 建议全面考虑一下逻辑,我也怕会影响其他未知的部分,其实我只是针对 代码找不到 ClientRects 时,利用 父节点

标签去获取了对应的位置。

@Vanessa219 Vanessa219 merged commit 68179b8 into Vanessa219:dev Jun 13, 2020
@Vanessa219
Copy link
Owner

还是 IDE 的对比好看一点,GitHub 上这个头都看晕了。

@Vanessa219 Vanessa219 self-requested a review June 13, 2020 03:12
@Vanessa219 Vanessa219 added this to the 3.3 milestone Jun 13, 2020
Vanessa219 added a commit that referenced this pull request Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants