sidebars: Don't highlight selection by default on search input focus.

Unless user wants to move the selection or type a value in search
input, we don't highlight the current selection.
This commit is contained in:
Aman Agrawal
2025-09-01 12:26:19 +05:30
committed by Tim Abbott
parent 478ea89506
commit 5dbf584ac5
6 changed files with 75 additions and 2 deletions

View File

@@ -329,6 +329,9 @@ async function test_stream_search_filters_stream_list(page: Page): Promise<void>
// Enter the search box and test highlighted suggestion
await page.click(".left-sidebar-search-input");
// Selection is not highlighted until user wants to move the cursor.
await page.waitForSelector(".top_left_inbox.top_left_row.highlighted_row", {hidden: true});
await arrow(page, "Down");
await page.waitForSelector(".top_left_inbox.top_left_row.highlighted_row", {visible: true});
await page.waitForSelector((await get_stream_li(page, "Verona")) + " .highlighted_row", {
@@ -412,6 +415,9 @@ async function test_users_search(page: Page): Promise<void> {
// Enter the search box and test selected suggestion navigation
await page.click(".user-list-filter");
// Selection is not highlighted until user wants to move the cursor.
await page.waitForSelector("#buddy-list-other-users .highlighted_user", {hidden: true});
await arrow(page, "Down");
await page.waitForSelector("#buddy-list-other-users .highlighted_user", {visible: true});
await assert_selected(page, "Desdemona");
await assert_not_selected(page, "Cordelia, Lear's daughter");