From 7b4f5fc45d1360323ebe3f8a41d7e553938eae61 Mon Sep 17 00:00:00 2001 From: reschan Date: Thu, 12 May 2022 19:22:00 +0700 Subject: [PATCH] fix: equipment input result list scrolling --- css/sq2bs.css | 1 + js/sq2bs.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/css/sq2bs.css b/css/sq2bs.css index 91c449a..b0f2dc0 100644 --- a/css/sq2bs.css +++ b/css/sq2bs.css @@ -65,6 +65,7 @@ ul { ul.search-box { position: absolute; padding: 0; + overflow: auto; } li.search-item { diff --git a/js/sq2bs.js b/js/sq2bs.js index c9df44b..f5b8c9b 100644 --- a/js/sq2bs.js +++ b/js/sq2bs.js @@ -321,6 +321,7 @@ function init_autocomplete() { selector: "#"+ eq +"-choice", wrapper: false, resultsList: { + maxResults: 1000, tabSelect: true, noResults: true, class: "search-box dark-7 rounded-bottom px-2 fw-bold dark-shadow-sm", @@ -330,6 +331,7 @@ function init_autocomplete() { list.style.top = position.bottom + window.scrollY +"px"; list.style.left = position.x+"px"; list.style.width = position.width+"px"; + list.style.maxHeight = position.height * 2 +"px"; if (!data.results.length) { message = document.createElement('li');