mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -323,7 +323,8 @@ export const enableProtyle = (protyle: IProtyle) => {
|
||||
return;
|
||||
}
|
||||
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
|
||||
} else {
|
||||
protyle.wysiwyg.element.setAttribute("contenteditable", "true");
|
||||
|
||||
@@ -87,8 +87,9 @@ export class WYSIWYG {
|
||||
this.element = document.createElement("div");
|
||||
this.element.className = "protyle-wysiwyg";
|
||||
this.element.setAttribute("spellcheck", "false");
|
||||
if (navigator && navigator.maxTouchPoints > 1 && navigator.platform === "MacIntel") {
|
||||
if (isMobile()) {
|
||||
// iPhone,iPad 端输入 contenteditable 为 true 时会在块中间插入 span
|
||||
// Android 端空块输入法弹出会收起 https://ld246.com/article/1689713888289
|
||||
this.element.setAttribute("contenteditable", "false");
|
||||
} else {
|
||||
this.element.setAttribute("contenteditable", "true");
|
||||
|
||||
Reference in New Issue
Block a user