vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.43k stars 6.93k forks source link

[Bug Report][3.3.16] V-Snackbar block router action #18283

Open afsharsafavi opened 10 months ago

afsharsafavi commented 10 months ago

Environment

Vuetify Version: 3.3.16 Last working version: 3.3.16 Vue Version: 3.3.4 Browsers: Firefox 117.0 OS: Linux x86_64

Steps to reproduce

Hi I have problem with V-Snackbar. When V-Snackbar is showing, all of vue router actions doesn't work. For example I can't use browser back and forward button or I can't use a button with router.go(-1) functionality. But after V-Snackbar timeout or I close it, everything is normal.

Expected Behavior

vue router work properly with V-Snackbar

Actual Behavior

V-Snackbar block vue-router

Reproduction Link

https://play.vuetifyjs.com/#...

zaptree commented 9 months ago

I'm having the same issue. The documentation mentions something about "persistent overlays will cancel navigation and animate as if they were clicked outside instead of closing." So I'm guessing that is somehow related. It makes the snackbar un-usable if you want to have working back and forward navigation buttons.

ffxsam commented 7 months ago

Just ran into this today. Initially, I considered it problematic, but on second thought, I'm not sure this is a bad thing:

If a user is about to hit "back" in their browser, and a snackbar pops up, they'll miss it. This keeps the user on the page until the message goes away, so they definitely won't miss it.

The only case this might be bad is if you have a snackbar with an indefinite timeout. Then they're stuck there until they close the snackbar, which may not be obvious.

afsharsafavi commented 7 months ago

back or next buttons of browser in our interface most of the time doesn't change website or interface, it change only router status and maybe a tab or something like that. But with this behavior of snackbar, users think all menu link (that work with vue router) doesn't work. Even if the user miss the message on pop up, miss behavior of the interface and menus is more important.

ffxsam commented 7 months ago

Ah, good point. If clicking a link also fails, that's probably no good.

ffxsam commented 7 months ago

Confirmed, I can still click navigation when a snackbar is displayed. I just can't use back/forward.

braiinzz commented 5 months ago

Just ran into this problem as well. For me this property on the snackbar fixed it: :close-on-back=false. I'm not sure if there are any other side effects setting this property, but maybe it helps someone else.

olivierpoisson commented 4 months ago
VSnackbar: {
    // please do not remove
    closeOnBack: false
},

did the trick for me in my global config