File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ export default class Combobox {
99
99
100
100
function keyboardBindings ( event : KeyboardEvent , combobox : Combobox ) {
101
101
if ( event . shiftKey || event . metaKey || event . altKey ) return
102
+ if ( ! ctrlBindings && event . ctrlKey ) return
102
103
if ( combobox . isComposing ) return
103
104
104
105
switch ( event . key ) {
@@ -132,7 +133,7 @@ function keyboardBindings(event: KeyboardEvent, combobox: Combobox) {
132
133
}
133
134
break
134
135
default :
135
- if ( ctrlBindings && event . ctrlKey ) break
136
+ if ( event . ctrlKey ) break
136
137
combobox . clearSelection ( )
137
138
}
138
139
}
Original file line number Diff line number Diff line change @@ -173,11 +173,9 @@ describe('combobox-nav', function() {
173
173
assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' )
174
174
assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' )
175
175
176
- if ( ctrlBindings ) {
177
- press ( input , 'Control' , true )
178
- assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' , 'Selection stays on modifier keydown' )
179
- assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' , 'Selection stays on modifier keydown' )
180
- }
176
+ press ( input , 'Control' , true )
177
+ assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' , 'Selection stays on modifier keydown' )
178
+ assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' , 'Selection stays on modifier keydown' )
181
179
182
180
press ( input , 'Backspace' )
183
181
assert ( ! list . querySelector ( '[aria-selected=true]' ) , 'Nothing should be selected' )
You can’t perform that action at this time.
0 commit comments