# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\xampp\htdocs\wordpress\trunk
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
316 | 316 | isEsc = ( event.which === 27 ), |
317 | 317 | isDown = ( event.which === 40 ), |
318 | 318 | isUp = ( event.which === 38 ), |
| 319 | isTab = ( event.which === 9 ), |
| 320 | isShift = ( event.shiftKey ), |
319 | 321 | selected = null, |
320 | 322 | firstVisible = this.$el.find( '> .widget-tpl:visible:first' ), |
321 | 323 | lastVisible = this.$el.find( '> .widget-tpl:visible:last' ), |
| 324 | isLastWidgetFocused = $( event.target ).is( '.widget-tpl:visible:last' ), |
322 | 325 | isSearchFocused = $( event.target ).is( this.$search ); |
323 | 326 | |
324 | 327 | if ( isDown || isUp ) { |
… |
… |
|
357 | 360 | } else if ( isEsc ) { |
358 | 361 | this.close( { returnFocus: true } ); |
359 | 362 | } |
| 363 | |
| 364 | if ( isTab ) { |
| 365 | if( isShift ) { |
| 366 | if ( isSearchFocused ) { |
| 367 | $( '.control-section:has(.open) .add-new-widget' ).focus(); |
| 368 | event.preventDefault(); |
360 | 369 | } |
| 370 | } else { |
| 371 | if ( isLastWidgetFocused ) { |
| 372 | $( '.control-section:has(.open) .add-new-widget' ).focus(); |
| 373 | event.preventDefault(); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | } |
361 | 378 | }); |
362 | 379 | |
363 | 380 | /** |