summaryrefslogtreecommitdiff
path: root/internal/ui/static/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ui/static/js/app.js')
-rw-r--r--internal/ui/static/js/app.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/ui/static/js/app.js b/internal/ui/static/js/app.js
index 39a77c8e..319c3cf2 100644
--- a/internal/ui/static/js/app.js
+++ b/internal/ui/static/js/app.js
@@ -27,7 +27,6 @@ function onAuxClick(selector, callback, noPreventDefault) {
// Show and hide the main menu on mobile devices.
function toggleMainMenu() {
- console.log("clc")
let menu = document.querySelector(".header nav ul");
let menuToggleButton = document.querySelector(".header button[aria-controls='header-menu']");
if (menu.classList.contains("js-menu-show")) {
@@ -69,8 +68,16 @@ function handleSubmitButtons() {
function setFocusToSearchInput(event) {
event.preventDefault();
event.stopPropagation();
+ const toggleSearchButton = document.querySelector(".search details")
+ console.log(toggleSearchButton.getAttribute("open"))
+ if (!toggleSearchButton.getAttribute("open")) {
+ toggleSearchButton.setAttribute("open", "")
+ const searchInputElement = document.getElementById("search-input");
+ searchInputElement.focus();
+ searchInputElement.value = "";
+ }
- let toggleSwitchElement = document.querySelector(".search-toggle-switch");
+ /* let toggleSwitchElement = document.querySelector(".search-toggle-switch");
if (toggleSwitchElement) {
toggleSwitchElement.style.display = "none";
}
@@ -84,7 +91,7 @@ function setFocusToSearchInput(event) {
if (searchInputElement) {
searchInputElement.focus();
searchInputElement.value = "";
- }
+ } */
}
// Show modal dialog with the list of keyboard shortcuts.