Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Closure of Search Mask When Using @click Directive with MouseDown Inside and MouseUp Outside #46

Open
CloudeaSoft opened this issue Apr 23, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@CloudeaSoft
Copy link
Contributor

Description

When utilizing the @click directive, an unexpected behavior occurs. If a user presses the mouse button down on an inner element, but releases the button outside of this area (on the mask element), the mask element is unexpectedly closed. This inconsistent behavior can lead to confusion and potentially poor user experience.

Address:

The issue can be traced to the code located at the following GitHub repository and file path:

<div class="mask" v-if="isShowSearch" @click="isShowSearch = false">
<div ref="container" class="container" @click.stop>

Solution

Use @mousedown instead of @click.

@CloudeaSoft
Copy link
Contributor Author

This issue can be [first-time-only] or [good-first-issue].

@KUN1007
Copy link
Owner

KUN1007 commented Apr 24, 2024

The search function will be refactored. This issue will be kept until the refactoring is complete.

@KUN1007 KUN1007 added good first issue Good for newcomers enhancement New feature or request labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants