From 73e2ae588d170ebbf066513669a6b1cdb8356e75 Mon Sep 17 00:00:00 2001 From: Getabalew Tesfaye Date: Wed, 8 Nov 2023 03:36:00 +0300 Subject: [PATCH] auto focus input when opening RHN --- docs/assets/js/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index aebd0f5d4864..73a34b2f9331 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -108,6 +108,8 @@ function openSidebar() { body.style.position = 'fixed'; body.style.top = `-${yAxis}`; + document.getElementById('gsc-i-id1').focus(); + // Close the sidebar when clicking sidebar layer (outside the sidebar search) const sidebarLayer = document.getElementById('sidebar-layer'); if (sidebarLayer) {