File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -205,24 +205,27 @@ CKEDITOR.plugins.add( 'listblock', {
205
205
focus : function ( value ) {
206
206
this . _ . focusIndex = - 1 ;
207
207
208
- if ( value ) {
209
- var selected = this . element . getDocument ( ) . getById ( this . _ . items [ value ] ) . getFirst ( ) ;
208
+ var links = this . element . getElementsByTag ( 'a' ) ,
209
+ link ,
210
+ selected ,
211
+ i = - 1 ;
210
212
211
- var links = this . element . getElementsByTag ( 'a' ) ,
212
- link ,
213
- i = - 1 ;
213
+ if ( value ) {
214
+ selected = this . element . getDocument ( ) . getById ( this . _ . items [ value ] ) . getFirst ( ) ;
214
215
215
216
while ( ( link = links . getItem ( ++ i ) ) ) {
216
217
if ( link . equals ( selected ) ) {
217
218
this . _ . focusIndex = i ;
218
219
break ;
219
220
}
220
221
}
221
-
222
- setTimeout ( function ( ) {
223
- selected . focus ( ) ;
224
- } , 0 ) ;
222
+ } else {
223
+ this . element . focus ( ) ;
225
224
}
225
+
226
+ selected && setTimeout ( function ( ) {
227
+ selected . focus ( ) ;
228
+ } , 0 ) ;
226
229
}
227
230
}
228
231
} ) ;
Original file line number Diff line number Diff line change 267
267
attributes : {
268
268
'tabIndex' : - 1 ,
269
269
'class' : 'cke_panel_block' ,
270
- 'role' : 'presentation'
270
+ 'role' : 'presentation' ,
271
+ 'tabindex' : 0
271
272
} ,
272
273
styles : {
273
274
display : 'none'
Original file line number Diff line number Diff line change @@ -249,14 +249,14 @@ CKEDITOR.plugins.add( 'richcombo', {
249
249
250
250
me . setState ( CKEDITOR . TRISTATE_ON ) ;
251
251
252
- list . focus ( ! list . multiSelect && me . getValue ( ) ) ;
253
-
254
252
me . _ . on = 1 ;
255
253
256
254
me . editorFocus && editor . focus ( ) ;
257
255
258
256
if ( me . onOpen )
259
257
me . onOpen ( ) ;
258
+
259
+ list . focus ( ! list . multiSelect && me . getValue ( ) ) ;
260
260
} ;
261
261
262
262
panel . onHide = function ( preventOnClose ) {
You can’t perform that action at this time.
0 commit comments