diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss index 1156e8eb8..db7ce7f5d 100644 --- a/app/src/assets/scss/mobile.scss +++ b/app/src/assets/scss/mobile.scss @@ -299,6 +299,11 @@ border: 0; color: var(--b3-theme-on-surface); + span { + padding: 6px; + white-space: nowrap; + } + &[disabled] { opacity: 0.38; } diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index be4113aba..1cdec1043 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -1641,22 +1641,22 @@ export class Toolbar { let html = "" const hasCopy = range.toString() !== "" || (range.cloneContents().childNodes[0] as HTMLElement)?.classList?.contains("emoji"); if (hasCopy) { - html += `` + html += `` if (!protyle.disabled) { - html += ` -` + html += ` +` } } if (!protyle.disabled) { - html += ` -` + html += ` +` } if (hasCopy || !protyle.disabled) { - html += `` + html += `` } this.subElement.innerHTML = `
${html}
`; this.subElement.lastElementChild.addEventListener("click", async (event) => { - const btnElemen = hasClosestByClassName(event.target as HTMLElement, "protyle-toolbar__item"); + const btnElemen = hasClosestByClassName(event.target as HTMLElement, "keyboard__action"); if (!btnElemen) { return } @@ -1711,20 +1711,20 @@ export class Toolbar { } else if (action === "back") { this.subElement.lastElementChild.innerHTML = html; } else if (action === "more") { - this.subElement.lastElementChild.innerHTML = ` -
- -
- -
-` - setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); + this.subElement.lastElementChild.innerHTML = ` +
+ +
+ +
+` + setPosition(this.subElement, rangePosition.left, rangePosition.top + 28, Constants.SIZE_TOOLBAR_HEIGHT); } }); this.subElement.classList.remove("fn__none"); this.subElementCloseCB = undefined; this.element.classList.add("fn__none"); const rangePosition = getSelectionPosition(nodeElement, range); - setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT); + setPosition(this.subElement, rangePosition.left, rangePosition.top + 28, Constants.SIZE_TOOLBAR_HEIGHT); } }