Vanessa 2023-04-21 20:00:17 +08:00
parent 4cbb21e81a
commit 2230d12fbb
3 changed files with 3 additions and 2 deletions

View file

@ -144,6 +144,7 @@
@include text-clamp(1);
flex: 1;
font-size: 17px;
min-height: 30px;
}
}

View file

@ -394,7 +394,7 @@ export const initKeyboardToolbar = () => {
return;
}
const buttonElement = hasClosestByMatchTag(target, "BUTTON");
if (!buttonElement || buttonElement.getAttribute("disabled")) {
if (!buttonElement || buttonElement.getAttribute("disabled") || getSelection().rangeCount === 0) {
return;
}
event.preventDefault();

View file

@ -36,7 +36,7 @@ export const handleTouchEnd = (event: TouchEvent) => {
target.tagName === "SPAN" && window.webkit?.messageHandlers &&
!hasClosestByAttribute(target, "data-type", "NodeBlockQueryEmbed")) {
// ios 长按行内元素弹出菜单
const types = target.getAttribute("data-type").split(" ")
const types = (target.getAttribute("data-type") || "").split(" ")
if (types.includes("inline-memo")) {
editor.protyle.toolbar.showRender(editor.protyle, target);
}