vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

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

Open afsharsafavi opened this issue 1 year ago • 6 comments

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/#...

afsharsafavi avatar Sep 19 '23 14:09 afsharsafavi

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.

zaptree avatar Oct 11 '23 00:10 zaptree

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.

ffxsam avatar Dec 21 '23 19:12 ffxsam

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.

afsharsafavi avatar Dec 22 '23 15:12 afsharsafavi

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

ffxsam avatar Dec 22 '23 17:12 ffxsam

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

ffxsam avatar Dec 22 '23 19:12 ffxsam

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.

braiinzz avatar Feb 16 '24 11:02 braiinzz

VSnackbar: {
    // please do not remove
    closeOnBack: false
},

did the trick for me in my global config

olivierpoisson avatar Mar 05 '24 15:03 olivierpoisson