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

鼠标在代码片段中选择代码,鼠标离开代码片段就反选 #11377

Closed
3 tasks done
allrobot opened this issue May 13, 2024 · 10 comments
Closed
3 tasks done

Comments

@allrobot
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

选择代码的逻辑可能有问题,选择代码时,鼠标稍微离开代码片段就反选,用户必须小心翼翼选择

Expected result

SiYuan_NioqMJWUH0

Screenshot or screen recording presentation

预期选择代码时,不会反选,离开距离较大就全选鼠标选中点往上的全部文本
chrome_OUVBijMLAp

image

Version environment

- Version: latest
- Operating System: WIN10
- Browser (if used):

Log file

NO

More information

不知道是不是归于bug,还是功能改善的

@Vanessa219
Copy link
Member

这个是受到前面行号的影响,目前没有找到合适的解决方案。可以使用以下方式顶顶,有合适的方案再进行解决。

  1. 不显示行号
  2. 使用快捷键进行选择
  3. 滑动的时候不要超出行号

@allrobot
Copy link
Author

这个是受到前面行号的影响,目前没有找到合适的解决方案。可以使用以下方式顶顶,有合适的方案再进行解决。

当没有一个合适的解决方案时,不应该关闭Issue,因为关闭后大概率不会再打开了

@88250
Copy link
Member

88250 commented May 31, 2024

有道理,这个可以保持打开挂一段时间。

@88250 88250 reopened this May 31, 2024
@wish5115
Copy link

wish5115 commented Aug 6, 2024

有个技巧,在没完成选择前不要松开鼠标左键,哪怕选择框消失,比如,拖到左侧时选择框消失,并不要紧,不要松开鼠标左键,继续拖到右侧来选择框又出现了。

see https://ld246.com/article/1722950512427/comment/1722952449582?r=wilsons#comments

@wish5115
Copy link

wish5115 commented Aug 7, 2024

@TCOTC
Copy link
Contributor

TCOTC commented Aug 7, 2024

楼上的 CSS:

/* 取消行号列占用的空间 */
.code-block .protyle-linenumber__rows {
    position: absolute;
    left: 0;
}
/* 当有行号时,代码块右移,给行号列让空间 */
.code-block .hljs.protyle-linenumber {
    margin-left: 3.6em;
}

@TCOTC
Copy link
Contributor

TCOTC commented Aug 17, 2024

@Vanessa219 #10769 貌似解决了这个问题?

@Vanessa219
Copy link
Member

现在离开会全选 😓

@TCOTC
Copy link
Contributor

TCOTC commented Aug 17, 2024

至少不是反向全选了😀

@Vanessa219
Copy link
Member

那就先关闭了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants