Manage chat files: UX: focus the search field when the view opens

This commit is contained in:
Juha Jeronen
2024-02-29 14:22:51 +02:00
parent f8f6dd1d90
commit e3084dda17

View File

@@ -6270,6 +6270,14 @@ export async function displayPastChats() {
const searchQuery = $(this).val();
debouncedDisplay(searchQuery);
});
// UX convenience: Focus the search field when the Manage Chat Files view opens.
setTimeout(function () {
const textSearchElement = $('#select_chat_search');
textSearchElement.click();
textSearchElement.focus();
textSearchElement.select(); // select content (if any) for easy erasing
}, 200);
}
function selectRightMenuWithAnimation(selectedMenuId) {