From 948dcd735dd3f5c9099ca015f68eb07a7d9d116f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Thu, 29 Aug 2024 16:46:53 +0100 Subject: [PATCH] feat: place cursor in input box In the Administration Options sidebar, when the 'Search' option is clicked, automatically focus on the search bar and place the cursor at its start --- code/web/interface/themes/responsive/js/aspen.js | 1 + code/web/interface/themes/responsive/js/aspen/admin.js | 1 + 2 files changed, 2 insertions(+) diff --git a/code/web/interface/themes/responsive/js/aspen.js b/code/web/interface/themes/responsive/js/aspen.js index 1450683fed..fec7bce84f 100644 --- a/code/web/interface/themes/responsive/js/aspen.js +++ b/code/web/interface/themes/responsive/js/aspen.js @@ -10205,6 +10205,7 @@ AspenDiscovery.Admin = (function () { showSearch: function () { $('#adminSearchBox').css('display', 'block'); $('#showSearchButton').css('display', 'none'); + document.getElementById('searchAdminBar').focus(); }, showFindCommunityContentForm: function (toolModule, toolName, objectType) { diff --git a/code/web/interface/themes/responsive/js/aspen/admin.js b/code/web/interface/themes/responsive/js/aspen/admin.js index c69324dd63..7c92866343 100644 --- a/code/web/interface/themes/responsive/js/aspen/admin.js +++ b/code/web/interface/themes/responsive/js/aspen/admin.js @@ -1989,6 +1989,7 @@ AspenDiscovery.Admin = (function () { showSearch: function () { $('#adminSearchBox').css('display', 'block'); $('#showSearchButton').css('display', 'none'); + document.getElementById('searchAdminBar').focus(); }, showFindCommunityContentForm: function (toolModule, toolName, objectType) {