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 {
9999
100100function keyboardBindings ( event : KeyboardEvent , combobox : Combobox ) {
101101 if ( event . shiftKey || event . metaKey || event . altKey ) return
102+ if ( ! ctrlBindings && event . ctrlKey ) return
102103 if ( combobox . isComposing ) return
103104
104105 switch ( event . key ) {
@@ -132,7 +133,7 @@ function keyboardBindings(event: KeyboardEvent, combobox: Combobox) {
132133 }
133134 break
134135 default :
135- if ( ctrlBindings && event . ctrlKey ) break
136+ if ( event . ctrlKey ) break
136137 combobox . clearSelection ( )
137138 }
138139}
Original file line number Diff line number Diff line change @@ -173,11 +173,9 @@ describe('combobox-nav', function() {
173173 assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' )
174174 assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' )
175175
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' )
181179
182180 press ( input , 'Backspace' )
183181 assert ( ! list . querySelector ( '[aria-selected=true]' ) , 'Nothing should be selected' )
You can’t perform that action at this time.
0 commit comments