Fix dropdowns scrolling by keyboard

This commit is contained in:
Giuseppe Criscione 2024-11-09 17:37:55 +01:00
parent af55f0fbaf
commit 3daa2ef8bb
2 changed files with 2 additions and 19 deletions

View File

@ -33,25 +33,12 @@
margin-top: 3px;
background-color: var(--color-base-900);
box-shadow: $box-shadow-md;
float: left;
}
.dropdown-menu::after,
.dropdown-list::after {
position: absolute;
bottom: -40px;
width: 1px;
height: 40px;
content: "";
overflow-y: scroll;
}
.dropdown-list {
width: 100%;
}
.dropdown-list-items {
max-height: 6.25 * (2 * 0.5rem * $base-line-height + $font-size-sm);
overflow-y: auto;
}
.dropdown-item {

View File

@ -93,10 +93,6 @@ export class TagInput {
dropdown = document.createElement("div");
dropdown.className = "dropdown-list";
const container = document.createElement("div");
container.className = "dropdown-list-items";
dropdown.appendChild(container);
for (const key in list) {
const item = document.createElement("div");
item.className = "dropdown-item";
@ -107,7 +103,7 @@ export class TagInput {
addTag(this.dataset.value);
}
});
container.appendChild(item);
dropdown.appendChild(item);
}
field.appendChild(dropdown);