diff --git src/bp-core/admin/js/hello.js src/bp-core/admin/js/hello.js
index f6d59aef1..da7eb3934 100644
|
|
|
|
| 28 | 28 | .removeClass( 'thickbox-loading' ); |
| 29 | 29 | |
| 30 | 30 | $( '#TB_ajaxContent' ).prop( 'style', 'height: 100%; width: auto; padding: 0; border: none;' ); |
| | 31 | |
| | 32 | var tabbables = $( ':tabbable', '#TB_ajaxContent' ), lastTabbable = tabbables.last(); |
| | 33 | |
| | 34 | // Move the focus to the Modal's close button once the last Hello link was tabbed out. |
| | 35 | $( '#TB_window' ).on( 'keydown', function( event ) { |
| | 36 | if ( 9 === event.keyCode && ! event.shiftKey && $( lastTabbable ).prop( 'classList' ).value === $( event.target ).prop( 'classList' ).value ) { |
| | 37 | event.preventDefault(); |
| | 38 | |
| | 39 | $( '#TB_closeWindowButton' ).focus(); |
| | 40 | } |
| | 41 | |
| | 42 | if ( 9 === event.keyCode && event.shiftKey && 'TB_closeWindowButton' === $( event.target ).prop( 'id' ) ) { |
| | 43 | event.preventDefault(); |
| | 44 | |
| | 45 | $( lastTabbable ).focus(); |
| | 46 | } |
| | 47 | } ); |
| 31 | 48 | }; |
| 32 | 49 | |
| 33 | 50 | /** |
| … |
… |
|
| 105 | 122 | bpHelloOpenModal(); |
| 106 | 123 | } ); |
| 107 | 124 | |
| | 125 | $( document.body ).on( 'thickbox:removed', function() { |
| | 126 | if ( $( '#wp-admin-bar-bp-about a' ).length ) { |
| | 127 | $( '#wpadminbar' ).append( |
| | 128 | $( '<a></a>' ) |
| | 129 | .prop( 'href', $( '#wp-admin-bar-bp-about a' ).prop( 'href' ) ) |
| | 130 | .prop( 'id', 'hello-buddypress' ) |
| | 131 | .html( $( '#wp-admin-bar-bp-about a' ).html() ) |
| | 132 | .addClass( 'screen-reader-shortcut' ) |
| | 133 | ); |
| | 134 | |
| | 135 | $( '#hello-buddypress' ).focus(); |
| | 136 | } |
| | 137 | } ); |
| | 138 | |
| 108 | 139 | }( jQuery, window.bp || {} ) ); |