mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
fix(mobile): selecting random elements while context menu is shown
This commit is contained in:
parent
bd10babd1b
commit
04a3ed5642
@ -63,6 +63,7 @@ class ContextMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.$cover.addClass("show");
|
this.$cover.addClass("show");
|
||||||
|
$("body").addClass("context-menu-shown");
|
||||||
|
|
||||||
this.$widget.empty();
|
this.$widget.empty();
|
||||||
|
|
||||||
@ -223,6 +224,7 @@ class ContextMenu {
|
|||||||
await timeout(100);
|
await timeout(100);
|
||||||
this.$widget.removeClass("show");
|
this.$widget.removeClass("show");
|
||||||
this.$cover.removeClass("show");
|
this.$cover.removeClass("show");
|
||||||
|
$("body").removeClass("context-menu-shown");
|
||||||
this.$widget.hide();
|
this.$widget.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,11 @@ body.mobile .desktop-only {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.mobile.context-menu-shown * {
|
||||||
|
user-select: none !important;
|
||||||
|
-webkit-user-select: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@ -977,6 +982,8 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
|
|||||||
#context-menu-container .dropdown-item {
|
#context-menu-container .dropdown-item {
|
||||||
padding: 0 7px 0 10px;
|
padding: 0 7px 0 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.desktop li.dropdown-submenu:hover > ul.dropdown-menu {
|
body.desktop li.dropdown-submenu:hover > ul.dropdown-menu {
|
||||||
|
@ -491,8 +491,10 @@ body.mobile #context-menu-container {
|
|||||||
right: 0 !important;
|
right: 0 !important;
|
||||||
bottom: 0 !important;
|
bottom: 0 !important;
|
||||||
top: unset !important;
|
top: unset !important;
|
||||||
max-height: 90vh;
|
max-height: 70vh;
|
||||||
overflow: auto !important;
|
overflow: auto !important;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tree actions toolbar */
|
/* Tree actions toolbar */
|
||||||
|
@ -40,6 +40,8 @@ span.fancytree-node.fancytree-hide {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
user-select: none !important;
|
||||||
|
-webkit-user-select: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fancytree-node:not(.fancytree-loading) .fancytree-expander {
|
.fancytree-node:not(.fancytree-loading) .fancytree-expander {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user