Skip to content

Commit

Permalink
🐛 图片剪切问题
Browse files Browse the repository at this point in the history
      段落存在图片时,选中图片,使用快捷键进行剪切或复制会操作整个段落。
  • Loading branch information
Vanessa219 committed Oct 15, 2023
1 parent c8924e3 commit d316585
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/protyle/wysiwyg/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}

// 支持非编辑块复制 https://ld246.com/article/1695353747104
if ((matchHotKey("⌘X", event) || matchHotKey("⌘C", event)) && selectText === "") {
if ((matchHotKey("⌘X", event) || matchHotKey("⌘C", event)) &&
selectText === "" &&
!nodeElement.querySelector(".img--select")) {
if (protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").length === 0) {
if (nodeElement.dataset.type !== "NodeHTMLBlock") {
// html 块不需要选中 https://github.com/siyuan-note/siyuan/issues/8706
Expand Down

0 comments on commit d316585

Please sign in to comment.