File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export default class Combobox {
79
79
this . input . addEventListener ( 'input' , this . inputHandler )
80
80
; ( this . input as HTMLElement ) . addEventListener ( 'keydown' , this . keyboardEventHandler )
81
81
this . list . addEventListener ( 'click' , commitWithElement )
82
- this . indicateDefaultOption ( )
82
+ this . resetSelection ( )
83
83
}
84
84
85
85
stop ( ) : void {
@@ -138,8 +138,9 @@ export default class Combobox {
138
138
139
139
clearSelection ( ) : void {
140
140
this . input . removeAttribute ( 'aria-activedescendant' )
141
- for ( const el of this . list . querySelectorAll ( '[aria-selected="true"]' ) ) {
141
+ for ( const el of this . list . querySelectorAll ( '[aria-selected="true"], [data-combobox-option-default="true"] ' ) ) {
142
142
el . removeAttribute ( 'aria-selected' )
143
+ el . removeAttribute ( 'data-combobox-option-default' )
143
144
}
144
145
}
145
146
You can’t perform that action at this time.
0 commit comments