Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
devlogin: Fix handling of fragments in the URL.
sankalp737d796e1c22
diff --git a/static/js/portico/dev-login.js b/static/js/portico/dev-login.jsindex 265ef72b11a..41929db274b 100644--- a/static/js/portico/dev-login.js+++ b/static/js/portico/dev-login.js@@ -5,12 +5,12 @@ $(() => {// dev_login.html is rendered.if ($("[data-page-id='dev-login']").length > 0) {if (window.location.hash.substring(0, 1) === "#") {- /* We append the location.hash to the formaction so that URL can be+ /* We append the location.hash to the input field with name next so that URL can bepreserved after user is logged in. See this:https://stackoverflow.com/questions/5283395/url-hash-is-persisting-between-redirects */- $("input[name='direct_email']").each(function () {- const new_formaction = $(this).attr("formaction") + "/" + window.location.hash;- $(this).attr("formaction", new_formaction);+ $("input[name='next']").each(function () {+ const new_value = $(this).attr("value") + window.location.hash;+ $(this).attr("value", new_value);});}}