mirror of https://github.com/zulip/zulip.git
groups_settings: Fix browser back button for groups overlay.
There is no problem in behavior of browser back button if we open
the group settings overlay using "#groups/your", "#groups/all" or
"#groups/new" url hash, but someone can directly go to a link with
"#groups" and in this case we want to fix the browser back button.
This commit replaces "#groups" entry with "#groups/your" which is the
default section opened, such that pressing back when on "#groups/your"
does not go to "#groups", which will then a form a cycle and instead
go back actually.
(cherry picked from commit c6be850fb9
)
This commit is contained in:
parent
9a04f5b0c4
commit
8549e9b648
|
@ -240,6 +240,10 @@ function do_hashchange_overlay(old_hash) {
|
|||
history.replaceState(null, "", browser_history.get_full_url("streams/subscribed"));
|
||||
}
|
||||
|
||||
if (base === "groups" && !section) {
|
||||
history.replaceState(null, "", browser_history.get_full_url("groups/your"));
|
||||
}
|
||||
|
||||
// Start by handling the specific case of going
|
||||
// from something like streams/all to streams_subscribed.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue