mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
list_cursor: Convert list_cursor to an ES6 class ListCursor.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9d90ae0e69
commit
2e94914be4
@@ -288,7 +288,7 @@ function keydown_enter_key() {
|
||||
}
|
||||
|
||||
exports.set_cursor_and_filter = function () {
|
||||
exports.user_cursor = list_cursor({
|
||||
exports.user_cursor = new ListCursor({
|
||||
list: buddy_list,
|
||||
highlight_class: "highlighted_user",
|
||||
});
|
||||
@@ -296,12 +296,12 @@ exports.set_cursor_and_filter = function () {
|
||||
exports.user_filter = new UserSearch({
|
||||
update_list: update_users_for_search,
|
||||
reset_items: exports.reset_users,
|
||||
on_focus: exports.user_cursor.reset,
|
||||
on_focus: () => exports.user_cursor.reset(),
|
||||
});
|
||||
|
||||
const $input = exports.user_filter.input_field();
|
||||
|
||||
$input.on("blur", exports.user_cursor.clear);
|
||||
$input.on("blur", () => exports.user_cursor.clear());
|
||||
|
||||
keydown_util.handle({
|
||||
elem: $input,
|
||||
|
||||
Reference in New Issue
Block a user