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

代码块纵向滚动显示问题 #48

Open
luceln opened this issue Jun 21, 2023 · 7 comments
Open

代码块纵向滚动显示问题 #48

luceln opened this issue Jun 21, 2023 · 7 comments

Comments

@luceln
Copy link

luceln commented Jun 21, 2023

  1. 代码块在19行出现滚动条时,第19行代码只显示出部分。
  2. 手动划到最底部后,再次编辑第19行代码,位置会跳回到刚才的位置(即显示部分文字)。
    image
@jinghu-moon
Copy link
Owner

代码块横向滚动有问题,目前没有找到比较好的解决方法。在考虑下个版本是否去掉该功能。🙃

@jinghu-moon
Copy link
Owner

昨晚没仔细看问题。但应该与代码块横向滚动条有关,xxxx-configs.css 注释下面代码,应该可以解决。

  --code-block-lines-horizontal-white-space: normal;
  --code-block-lines-horizontal-overflow-x : auto;

@luceln luceln closed this as completed Jun 22, 2023
@luceln
Copy link
Author

luceln commented Jun 22, 2023

注释了没有效果,而且我发现鼠标单击最后一行也会出现这种情况

@luceln luceln reopened this Jun 22, 2023
@jinghu-moon
Copy link
Owner

SeeYue/code-block/ 路径下 code-block.css 注释下面代码,应该可以吧?

  /* 代码块行横向滚轮 */
  #write pre.md-fences .CodeMirror-wrap .CodeMirror-code pre {
    overflow-x : var(--code-block-lines-horizontal-overflow-x) !important;
    white-space: var(--code-block-lines-horizontal-white-space) !important;
  }

@luceln
Copy link
Author

luceln commented Jun 22, 2023

这块代码也已经注释了,没有效果

@luceln
Copy link
Author

luceln commented Jun 22, 2023

点击代码块前三行,代码会向上跳显示前面的代码。点击代码块倒数三行会向下跳显示下面的代码。向上的显示没问题,向下跳动的最后一行总是只显示一部分。
image

@jinghu-moon
Copy link
Owner

jinghu-moon commented Jun 22, 2023

我复现出这个问题了。估计是点击最后面几行被电脑认为是拖动滚轮了,就出现了这样的效果。目前不知道怎么解决。🙃

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

2 participants