Merge branch 'fix/click' into 'develop'
fix: Click event of MenuParent unexpectedly goes to underlying element Co-authored-by: Lhcfl <Lhcfl@outlook.com> See merge request firefish/firefish!10792
This commit is contained in:
commit
9a4a75bf92
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,7 @@
|
|||
v-else-if="item.type === 'parent'"
|
||||
class="_button item parent"
|
||||
:class="{ childShowing: childShowingItem === item }"
|
||||
@mouseenter="showChildren(item, $event)"
|
||||
@mouseenter.passive="showChildren(item, $event)"
|
||||
@click.stop="showChildren(item, $event)"
|
||||
>
|
||||
<i
|
||||
|
@ -318,6 +318,7 @@ function onItemMouseLeave(_item) {
|
|||
|
||||
async function showChildren(item: MenuParent, ev: MouseEvent) {
|
||||
if (props.asDrawer) {
|
||||
if (ev.type === "mouseenter") return;
|
||||
os.popupMenu(item.children, (ev.currentTarget ?? ev.target) as HTMLElement);
|
||||
close();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue