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:
Linca 2024-05-05 10:35:49 +00:00
commit 042403311e

View file

@ -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 {