KUN1007 / kun-galgame-nuxt3

The CUTEST Visual Novel / Galgame Forum! KUN Visual Novel project. KUN Visual Novel Forum 2nd generation!
https://www.kungal.com
GNU Affero General Public License v3.0
490 stars 31 forks source link

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

Closed CloudeaSoft closed 1 week ago

CloudeaSoft commented 4 months ago

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:

https://github.com/KUN1007/kun-galgame-nuxt3/blob/35858115d407dd11d1d5e323eb38dc9a35bad826/components/kun/search/Search.vue#L89-L90

Solution

Use @mousedown instead of @click.

CloudeaSoft commented 4 months ago

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

KUN1007 commented 4 months ago

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