From 24a8aa42c853c5f8ef07f7d73e8ec26fa847d418 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 17 Sep 2021 18:53:32 +0200 Subject: [PATCH] chg: [navbar:search-all] Fixed dropdown instantiation --- templates/element/layouts/header/header-right.php | 6 ++++-- webroot/js/main.js | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/element/layouts/header/header-right.php b/templates/element/layouts/header/header-right.php index ef07e17..b0a3a6d 100644 --- a/templates/element/layouts/header/header-right.php +++ b/templates/element/layouts/header/header-right.php @@ -4,8 +4,10 @@ - -
diff --git a/webroot/js/main.js b/webroot/js/main.js index 2d6eacc..3459af3 100644 --- a/webroot/js/main.js +++ b/webroot/js/main.js @@ -128,7 +128,7 @@ function performGlobalSearch(evt) { return; } if (value.length < 3 && evt.keyCode != 13) { - bootstrap.Popover.getInstance('#dropdownMenuSearchAll').hide() + bootstrap.Dropdown.getOrCreateInstance('#dropdownMenuSearchAll').hide() return; } const endpoint = '/instance/searchAll' @@ -138,7 +138,7 @@ function performGlobalSearch(evt) { statusNode: $resultContainer } - bootstrap.Popover.getInstance('#dropdownMenuSearchAll').show() + bootstrap.Dropdown.getOrCreateInstance('#dropdownMenuSearchAll').show() AJAXApi.quickFetchURL(url, options).then((theHTML) => { $resultContainer.html(theHTML) })