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

[Bug Report][2.5.6] VSnackbar can get stuck on mobile #13904

Closed
WIStudent opened this issue Jul 8, 2021 · 1 comment
Closed

[Bug Report][2.5.6] VSnackbar can get stuck on mobile #13904

WIStudent opened this issue Jul 8, 2021 · 1 comment
Assignees
Labels
C: VSnackbar VSnackbar T: bug Functionality that does not work as intended/expected
Milestone

Comments

@WIStudent
Copy link

Environment

Vuetify Version: 2.5.6
Vue Version: 2.6.14
Browsers: Google Chrome
OS: Android

Steps to reproduce

  1. Open the reproduction link in Android Chrome
  2. Click the "open snackbar" button
  3. Tap on the snackbar while it is open

Expected Behavior

The snackbar should still close after the timeout expired.

Actual Behavior

If the user does nothing, the snackbar stays open indefinitely. The timeout is only applied again if the user taps on something other than the snackbar

Reproduction Link

https://codepen.io/wistudent/full/ZEKObMX

Other comments

This seems to be caused by this part:

mouseenter: () => window.clearTimeout(this.activeTimeout),
mouseleave: this.setTimeout,

On mobile tapping an element triggers a mouseenter event, but no mouseleave event. Instead of mouseenter/mouseleave I would recommend using pointerenter/pointerleave. On devices with a mouse it just behaves like mouesenter/mouseleave, but on touch devices the pointerleave event is fired as soon as the finger stops touching the screen.

@ghost ghost added the S: triage label Jul 8, 2021
@KaelWD KaelWD added C: VSnackbar VSnackbar T: bug Functionality that does not work as intended/expected and removed S: triage labels Jul 8, 2021
@KaelWD
Copy link
Member

KaelWD commented Jul 8, 2021

pointerenter is only supported since safari 13 (thanks apple)

@KaelWD KaelWD self-assigned this Jul 8, 2021
@KaelWD KaelWD added this to the v2.5.x milestone Jul 8, 2021
@KaelWD KaelWD closed this as completed in 74ecaa9 Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSnackbar VSnackbar T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants