diff --git a/.changeset/silver-dingos-mate.md b/.changeset/silver-dingos-mate.md index e25c1583f2..ea0eed4fd4 100644 --- a/.changeset/silver-dingos-mate.md +++ b/.changeset/silver-dingos-mate.md @@ -3,4 +3,4 @@ "@navikt/ds-css": patch --- -Combobox: only apply filteredOptions scroll offset when max options is rendered +Combobox: :bug: Fix scroll issue when using arrow keys to navigate list diff --git a/@navikt/core/css/darkside/form/combobox.darkside.css b/@navikt/core/css/darkside/form/combobox.darkside.css index c170408e5e..a6fcae859e 100644 --- a/@navikt/core/css/darkside/form/combobox.darkside.css +++ b/@navikt/core/css/darkside/form/combobox.darkside.css @@ -305,10 +305,6 @@ border: 1px solid var(--ac-combobox-list-item-max-selected-border, var(--a-border-info)); } -.navds-combobox__list--max-selected .navds-combobox__list-item { - scroll-margin-top: 50px; -} - .navds-combobox__list_non-selectables:hover { cursor: default; } diff --git a/@navikt/core/css/form/combobox.css b/@navikt/core/css/form/combobox.css index c170408e5e..a6fcae859e 100644 --- a/@navikt/core/css/form/combobox.css +++ b/@navikt/core/css/form/combobox.css @@ -305,10 +305,6 @@ border: 1px solid var(--ac-combobox-list-item-max-selected-border, var(--a-border-info)); } -.navds-combobox__list--max-selected .navds-combobox__list-item { - scroll-margin-top: 50px; -} - .navds-combobox__list_non-selectables:hover { cursor: default; } diff --git a/@navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx b/@navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx index 21b34a09bd..4db73fb21f 100644 --- a/@navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx +++ b/@navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx @@ -58,9 +58,7 @@ const FilteredOptions = () => {