Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

hotkeys: Go through hashchange to open drafts.

Aman Agrawald666b465b952
diff --git a/frontend_tests/node_tests/hotkey.js b/frontend_tests/node_tests/hotkey.js
index 1b1d574b031..901bd950ba8 100644
--- a/frontend_tests/node_tests/hotkey.js
+++ b/frontend_tests/node_tests/hotkey.js
@@ -320,7 +320,7 @@ run_test("drafts closed w/other overlay", (override) => {
run_test("drafts closed launch", (override) => {
override(overlays, "is_active", () => false);
- assert_mapping("d", drafts, "launch");
+ assert_mapping("d", browser_history, "go_to_location");
});
run_test("misc", () => {
diff --git a/static/js/hotkey.js b/static/js/hotkey.js
index fb6dd01687c..3c18678d8fb 100644
--- a/static/js/hotkey.js
+++ b/static/js/hotkey.js
@@ -804,7 +804,7 @@ export function process_hotkey(e, hotkey) {
compose_actions.start("private", {trigger: "compose_hotkey"});
return true;
case "open_drafts":
- drafts.launch();
+ browser_history.go_to_location("drafts");
return true;
case "C_deprecated":
ui.maybe_show_deprecation_notice("C");