From f48f92b84b25e72c5c493c09d1ee5db6efc55f34 Mon Sep 17 00:00:00 2001 From: lscambo13 Date: Mon, 29 Jan 2024 23:43:18 +0530 Subject: [PATCH] dev: prevent clipping --- js_modules/search.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js_modules/search.js b/js_modules/search.js index 7980569..a1d4931 100644 --- a/js_modules/search.js +++ b/js_modules/search.js @@ -162,13 +162,13 @@ export const collapseAutofill = () => { }; const expandAutofill = (input) => { - const autofillItems = document.querySelectorAll('.autofillItem'); + const items = document.querySelectorAll('.autofillItem'); if (input.length) { searchBG.style.display = 'block'; setTimeout(() => { - if (autofillItems.length) { - const d = autofillItems[0].getBoundingClientRect(); - const calc = (d.height * autofillItems.length) + (d.height * 1); + if (items.length) { + const d = items[0].getBoundingClientRect(); + const calc = (d.height * items.length) + (d.height * 1.5); container.style.height = `${calc}px`; container.style.paddingBlockStart = '0em'; }