Improve hitbox registration in v-menu

Fixes #5774
This commit is contained in:
rijkvanzanten
2021-05-21 22:13:02 -04:00
parent b782eba859
commit a40d75a184
4 changed files with 9 additions and 2 deletions

View File

@@ -133,6 +133,7 @@ body {
color: var(--v-list-item-color);
text-decoration: none;
border-radius: var(--v-list-item-border-radius);
pointer-events: all;
&.dashed {
&::after {

View File

@@ -80,6 +80,7 @@ body {
color: var(--v-list-color);
line-height: 22px;
border-radius: var(--border-radius);
pointer-events: none;
&.large {
--v-list-padding: 12px;

View File

@@ -233,8 +233,8 @@ export default defineComponent({
return !activator.value?.contains(e.target as Node);
}
function onContentClick() {
if (props.closeOnContentClick === true) {
function onContentClick(e: Event) {
if (props.closeOnContentClick === true && e.target !== e.currentTarget) {
deactivate();
}
}