mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
stream_settings: Fix stream row switching behavior.
Add a rule to the switch_rows(event) function to avoid switching stream row when pressing up/down key by checking the current URL hash and the add_subscribers_pill focus state. Add a utility function to hash_parser to help implement new switch_rows behavior mentioned above. Fixes #29690.
This commit is contained in:
@@ -91,6 +91,20 @@ export function is_create_new_stream_narrow(): boolean {
|
||||
return window.location.hash === "#streams/new";
|
||||
}
|
||||
|
||||
// This checks whether the user is in the stream settings menu
|
||||
// and is opening the 'Subscribers' tab on the right panel.
|
||||
export function is_subscribers_section_opened_for_stream(): boolean {
|
||||
const hash_components = window.location.hash.slice(1).split(/\//);
|
||||
|
||||
if (hash_components[0] !== "streams") {
|
||||
return false;
|
||||
}
|
||||
if (!hash_components[3]) {
|
||||
return false;
|
||||
}
|
||||
return hash_components[3] === "subscribers";
|
||||
}
|
||||
|
||||
export const allowed_web_public_narrows = [
|
||||
"channels",
|
||||
"channel",
|
||||
|
||||
Reference in New Issue
Block a user