mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 05:28:07 +01:00
🐛 图片剪切问题
段落存在图片时,选中图片,使用快捷键进行剪切或复制会操作整个段落。
This commit is contained in:
parent
c8924e37ae
commit
d316585905
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue