mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
a35f5acd0e
commit
577bd45ba5
1 changed files with 18 additions and 2 deletions
|
|
@ -209,8 +209,24 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
|
||||||
if (this.element.classList.contains("fn__none")) {
|
if (this.element.classList.contains("fn__none")) {
|
||||||
this.element.innerHTML = '<div class="fn__loading" style="height: 128px;position: initial"><img width="64px" src="/stage/loading-pure.svg"></div>';
|
this.element.innerHTML = '<div class="fn__loading" style="height: 128px;position: initial"><img width="64px" src="/stage/loading-pure.svg"></div>';
|
||||||
this.element.classList.remove("fn__none");
|
this.element.classList.remove("fn__none");
|
||||||
const textareaPosition = getSelectionPosition(protyle.wysiwyg.element);
|
if (this.source === "av") {
|
||||||
setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30);
|
const cellElement = hasClosestByClassName(protyle.toolbar.range.startContainer, "av__cell");
|
||||||
|
if (cellElement) {
|
||||||
|
/// #if !MOBILE
|
||||||
|
const cellRect = cellElement.getBoundingClientRect();
|
||||||
|
setPosition(this.element, cellRect.left, cellRect.bottom, cellRect.height);
|
||||||
|
/// #else
|
||||||
|
setPosition(this.element, 0, 0);
|
||||||
|
/// #endif
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/// #if !MOBILE
|
||||||
|
const textareaPosition = getSelectionPosition(protyle.wysiwyg.element);
|
||||||
|
setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30);
|
||||||
|
/// #else
|
||||||
|
setPosition(this.element, 0, 0);
|
||||||
|
/// #endif
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.element.insertAdjacentHTML("beforeend", '<div class="fn__loading"><img width="64px" src="/stage/loading-pure.svg"></div>');
|
this.element.insertAdjacentHTML("beforeend", '<div class="fn__loading"><img width="64px" src="/stage/loading-pure.svg"></div>');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue