mirror of https://github.com/zulip/zulip.git
stream-settings: Fix browser back button behavior for stream settings overlay.
There is no problem in behavior of browser back button we open stream settings overlay using UI elements since they are appropriately linked to "#streams/all", "#streams/subscribed" and "#streams/new", but someone can directly go to a link with "#streams" and in this case we want to fix the browser back button. This commit replaces "#streams" entry with "#streams/subscribed" which is the default section opened, such that pressing back when on "#streams/subscribed" does not go to "#streams" and instead go back actually.
This commit is contained in:
parent
9501dd0f94
commit
7a2bbc54a8
|
@ -213,6 +213,10 @@ function do_hashchange_overlay(old_hash) {
|
|||
);
|
||||
}
|
||||
|
||||
if (base === "streams" && !section) {
|
||||
history.replaceState(null, "", get_full_url("streams/subscribed"));
|
||||
}
|
||||
|
||||
// Start by handling the specific case of going
|
||||
// from something like streams/all to streams_subscribed.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue