Skip to content

Commit b91ce57

Browse files
authored
Combobox: 🐛 Remove virtual focus on input blur instead of moving it (#3261)
1 parent 99eaf41 commit b91ce57

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stale-pigs-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@navikt/ds-react": patch
3+
---
4+
5+
Combobox: :bug: Remove virtual focus on input blur instead of moving it

@navikt/core/react/src/form/combobox/Input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
253253
type="text"
254254
role="combobox"
255255
value={value}
256-
onBlur={composeEventHandlers(onBlur, virtualFocus.moveFocusToTop)}
256+
onBlur={composeEventHandlers(onBlur, virtualFocus.resetFocus)}
257257
onClick={() => {
258258
setHideCaret(!!maxSelected?.isLimitReached);
259259
value !== searchTerm && onChange(value);

0 commit comments

Comments
 (0)