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

[Feature Request] Closing v-dialog by browser's "back" btn #5324

Closed
gileneusz opened this issue Oct 14, 2018 · 1 comment
Closed

[Feature Request] Closing v-dialog by browser's "back" btn #5324

gileneusz opened this issue Oct 14, 2018 · 1 comment
Labels
duplicate The issue has already been reported

Comments

@gileneusz
Copy link

Problem to solve

I've got multiple dialogs in my application. On mobile environment users tend to click "back" button when they want to close dialog. Very bad when user just want to use login/register dialog. This is causing closing the whole app and bad user experience. "Uhm website is closed now, but I wanted only to log in - I quit!"

Proposed solution

Implementing default v-dialog closing behaviour for browser's back button. This will solve this problem forever.
suggested solution: make fake browser history:

while opening dialog
window.history.pushState({}, );

window.addEventListener("popstate", event => {
//close your dialog here and remove this listener
});

@jacekkarczmarczyk
Copy link
Member

Duplicate of #1793

@jacekkarczmarczyk jacekkarczmarczyk marked this as a duplicate of #1793 Oct 14, 2018
@jacekkarczmarczyk jacekkarczmarczyk added the duplicate The issue has already been reported label Oct 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate The issue has already been reported
Projects
None yet
Development

No branches or pull requests

2 participants