mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
e524bdda24
commit
2ffc64a500
2 changed files with 4 additions and 2 deletions
|
@ -323,7 +323,8 @@ export const enableProtyle = (protyle: IProtyle) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
protyle.disabled = false;
|
protyle.disabled = false;
|
||||||
if (navigator && navigator.maxTouchPoints > 1 && ["MacIntel", "iPhone"].includes(navigator.platform)) {
|
if (isMobile()) {
|
||||||
|
// Android 端空块输入法弹出会收起 https://ld246.com/article/1689713888289
|
||||||
// iPhone,iPad 端 protyle.wysiwyg.element contenteditable 为 true 时,输入会在块中间插入 span 导致保存失败 https://ld246.com/article/1643473862873/comment/1643813765839#comments
|
// iPhone,iPad 端 protyle.wysiwyg.element contenteditable 为 true 时,输入会在块中间插入 span 导致保存失败 https://ld246.com/article/1643473862873/comment/1643813765839#comments
|
||||||
} else {
|
} else {
|
||||||
protyle.wysiwyg.element.setAttribute("contenteditable", "true");
|
protyle.wysiwyg.element.setAttribute("contenteditable", "true");
|
||||||
|
|
|
@ -87,8 +87,9 @@ export class WYSIWYG {
|
||||||
this.element = document.createElement("div");
|
this.element = document.createElement("div");
|
||||||
this.element.className = "protyle-wysiwyg";
|
this.element.className = "protyle-wysiwyg";
|
||||||
this.element.setAttribute("spellcheck", "false");
|
this.element.setAttribute("spellcheck", "false");
|
||||||
if (navigator && navigator.maxTouchPoints > 1 && navigator.platform === "MacIntel") {
|
if (isMobile()) {
|
||||||
// iPhone,iPad 端输入 contenteditable 为 true 时会在块中间插入 span
|
// iPhone,iPad 端输入 contenteditable 为 true 时会在块中间插入 span
|
||||||
|
// Android 端空块输入法弹出会收起 https://ld246.com/article/1689713888289
|
||||||
this.element.setAttribute("contenteditable", "false");
|
this.element.setAttribute("contenteditable", "false");
|
||||||
} else {
|
} else {
|
||||||
this.element.setAttribute("contenteditable", "true");
|
this.element.setAttribute("contenteditable", "true");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue