Skip to content

Commit

Permalink
dev: prevent clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
lscambo13 committed Jan 29, 2024
1 parent def6cb6 commit f48f92b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js_modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit f48f92b

Please sign in to comment.