mirror of https://github.com/zulip/zulip.git
portico: Fix subdomain check flickering with arrow keys.
The previous logic would treat navigating with the arrow keys, or alt-tab, as a reason to clear the subdomain unavailable warning, and would not necessarily check again immediately. Now just trigger off changes in the input. Instead, just trigger off actual changes in the value of the input.
This commit is contained in:
parent
e9b0c7f2c0
commit
20d90a6df6
|
@ -223,13 +223,10 @@ $(() => {
|
|||
update_full_name_section();
|
||||
|
||||
let timer: number;
|
||||
$("#id_team_subdomain").on("keydown", () => {
|
||||
$("#id_team_subdomain").on("input", () => {
|
||||
$(".team_subdomain_error_server").text("").css("display", "none");
|
||||
$("#id_team_subdomain_error_client").css("display", "none");
|
||||
clearTimeout(timer);
|
||||
});
|
||||
$("#id_team_subdomain").on("keyup", () => {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(check_subdomain_available, 250, $("#id_team_subdomain").val());
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue