mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
todo_widget: Fix cursor focus in todo lists.
Previously, when adding a task to a /todo list, after pressing "Add
task", the cursor would move to the "Description" field, which is
not the desired behavior. This commit fixes this issue by ensuring
that the cursor moves to the "New task" field after a task is created.
The core bug was introduced in
68dcdcd28e
, which added the incorrect
.focus().
Also tighten the selectors while we're at it.
Fixes #25064.
This commit is contained in:
@@ -179,8 +179,8 @@ export function activate(opts) {
|
||||
return;
|
||||
}
|
||||
|
||||
$elem.find(".add-task").val("").trigger("focus");
|
||||
$elem.find(".add-desc").val("").trigger("focus");
|
||||
$elem.find("input.add-task").val("").trigger("focus");
|
||||
$elem.find("input.add-desc").val("");
|
||||
|
||||
const task_exists = task_data.name_in_use(task);
|
||||
if (task_exists) {
|
||||
|
Reference in New Issue
Block a user