Skip to content

Commit d8d8960

Browse files
author
imengyu
committed
[Fix] No scroll outside when in menu (#116)
1 parent 1a7fa53 commit d8d8960

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

library/ContextMenu.scss

+2-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@
6666
overflow: visible;
6767
}
6868
.mx-context-menu-scroll {
69-
position: absolute;
70-
top: 0;
71-
left: 0;
72-
right: 0;
73-
bottom: 1px;
74-
pointer-events: none;
69+
overscroll-behavior: contain;
7570
}
7671

7772
//Item
@@ -82,6 +77,7 @@
8277
align-items: center;
8378
position: relative;
8479
padding: 6px 15px;
80+
-webkit-user-select: none;
8581
user-select: none;
8682
overflow: visible;
8783
white-space: nowrap;

library/ContextSubMenu.vue

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
width: 'auto',
2727
height: `${overflow ? maxHeight : scrollHeight}px`,
2828
}"
29+
containerClass="mx-context-menu-scroll"
2930
>
3031
<!--Child menu items-->
3132
<div

0 commit comments

Comments
 (0)