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

Can't open block menu when the cursor is located in an empty code block #9095

Conversation

Zuoqiu-Yingyi
Copy link
Contributor

@Zuoqiu-Yingyi Zuoqiu-Yingyi commented Sep 1, 2023

  • Please commit to the dev branch
  • For contributing new features, please supplement and improve the corresponding user guide documents
  • For bug fixes, please describe the problem and solution via code comments
  • For text improvements (such as typos and wording adjustments), please submit directly

问题描述: 当光标在空的代码块中时无法使用 Ctrl + / 打开块菜单
Issue: Unable to open the block menu with Ctrl + / when the cursor is in an empty code block

问题原因 | The cause of the problem
element.getAttribute("data-type") 可能返回 null, 因此需要使用 ?. 以判断其是否有效

已经过测试 | Tested

@Vanessa219 Vanessa219 merged commit f435e23 into siyuan-note:dev Sep 2, 2023
3 checks passed
@Vanessa219 Vanessa219 added this to the 2.10.3 milestone Sep 2, 2023
@Zuoqiu-Yingyi Zuoqiu-Yingyi deleted the fix/open-block-menu-in-empty-code-block branch September 2, 2023 06:21
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