This commit is contained in:
Vanessa 2023-04-02 22:23:12 +08:00 committed by Liang Ding
parent 8e1841a108
commit 00972914fd
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 16 additions and 0 deletions

View file

@ -426,6 +426,13 @@
@extend .fn__ellipsis;
}
// iPhone 右上角属性中对不齐
.protyle-wysiwyg--attr .protyle-attr > div:not(.protyle-attr--memo):not(.protyle-attr--refcount) {
max-width: 26vw;
white-space: nowrap;
display: block;
}
@media (max-width: 620px) {
.protyle-wysiwyg [data-node-id].sb[data-sb-layout="col"] {
flex-direction: column;

View file

@ -48,6 +48,8 @@ export const handleTouchEnd = (event: TouchEvent) => {
scrollElement = scrollElement.classList.contains("table") ? (scrollElement.firstElementChild as HTMLElement) : (scrollElement.firstElementChild.nextElementSibling as HTMLElement);
if ((xDiff <= 0 && scrollElement.scrollLeft > 0) ||
(xDiff >= 0 && scrollElement.clientWidth + scrollElement.scrollLeft < scrollElement.scrollWidth)) {
// 左滑拉出菜单后右滑至代码块右侧有空间时,需关闭菜单
closePanel();
return;
}
}
@ -151,6 +153,13 @@ export const handleTouchMove = (event: TouchEvent) => {
hasClosestByAttribute(target, "id", "model")) {
return;
}
if (getSelection().rangeCount > 0) {
// 选中后扩选的情况
const range = getSelection().getRangeAt(0);
if (range.toString() !== "" && window.siyuan.mobile.editor.protyle.wysiwyg.element.contains(range.startContainer)) {
return;
}
}
xDiff = Math.floor(clientX - event.touches[0].clientX);
yDiff = Math.floor(clientY - event.touches[0].clientY);