File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,9 @@ Treeitem.prototype.handleKeydown = function (event) {
132
132
}
133
133
134
134
if ( event . shift ) {
135
- printableCharacter ( this ) ;
135
+ if ( isPrintableCharacter ( char ) ) {
136
+ printableCharacter ( this ) ;
137
+ }
136
138
}
137
139
else {
138
140
switch ( event . keyCode ) {
@@ -170,9 +172,14 @@ Treeitem.prototype.handleKeydown = function (event) {
170
172
171
173
case this . keyCode . RIGHT :
172
174
if ( this . isExpandable ) {
173
- this . tree . expandTreeitem ( this ) ;
174
- flag = true ;
175
+ if ( this . isExpanded ( ) ) {
176
+ this . tree . setFocusToNextItem ( this ) ;
177
+ }
178
+ else {
179
+ this . tree . expandTreeitem ( this ) ;
180
+ }
175
181
}
182
+ flag = true ;
176
183
break ;
177
184
178
185
case this . keyCode . LEFT :
@@ -199,7 +206,9 @@ Treeitem.prototype.handleKeydown = function (event) {
199
206
break ;
200
207
201
208
default :
202
- printableCharacter ( this ) ;
209
+ if ( isPrintableCharacter ( char ) ) {
210
+ printableCharacter ( this ) ;
211
+ }
203
212
break ;
204
213
}
205
214
Original file line number Diff line number Diff line change @@ -143,7 +143,9 @@ TreeitemLink.prototype.handleKeydown = function (event) {
143
143
this . stopDefaultClick = true ;
144
144
}
145
145
else {
146
- printableCharacter ( this ) ;
146
+ if ( isPrintableCharacter ( char ) ) {
147
+ printableCharacter ( this ) ;
148
+ }
147
149
}
148
150
}
149
151
else {
@@ -177,9 +179,14 @@ TreeitemLink.prototype.handleKeydown = function (event) {
177
179
178
180
case this . keyCode . RIGHT :
179
181
if ( this . isExpandable ) {
180
- this . tree . expandTreeitem ( this ) ;
181
- flag = true ;
182
+ if ( this . isExpanded ( ) ) {
183
+ this . tree . setFocusToNextItem ( this ) ;
184
+ }
185
+ else {
186
+ this . tree . expandTreeitem ( this ) ;
187
+ }
182
188
}
189
+ flag = true ;
183
190
break ;
184
191
185
192
case this . keyCode . LEFT :
@@ -206,7 +213,9 @@ TreeitemLink.prototype.handleKeydown = function (event) {
206
213
break ;
207
214
208
215
default :
209
- printableCharacter ( this ) ;
216
+ if ( isPrintableCharacter ( char ) ) {
217
+ printableCharacter ( this ) ;
218
+ }
210
219
break ;
211
220
}
212
221
}
You can’t perform that action at this time.
0 commit comments