wp/wp-admin/js/theme-plugin-editor.js
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    99 			.addClass( 'modal-open' )
    99 			.addClass( 'modal-open' )
   100 			.append( component.warning.detach() );
   100 			.append( component.warning.detach() );
   101 		// Reveal the modal and set focus on the go back button.
   101 		// Reveal the modal and set focus on the go back button.
   102 		component.warning
   102 		component.warning
   103 			.removeClass( 'hidden' )
   103 			.removeClass( 'hidden' )
   104 			.find( '.file-editor-warning-go-back' ).focus();
   104 			.find( '.file-editor-warning-go-back' ).trigger( 'focus' );
   105 		// Get the links and buttons within the modal.
   105 		// Get the links and buttons within the modal.
   106 		component.warningTabbables = component.warning.find( 'a, button' );
   106 		component.warningTabbables = component.warning.find( 'a, button' );
   107 		// Attach event handlers.
   107 		// Attach event handlers.
   108 		component.warningTabbables.on( 'keydown', component.constrainTabbing );
   108 		component.warningTabbables.on( 'keydown', component.constrainTabbing );
   109 		component.warning.on( 'click', '.file-editor-warning-dismiss', component.dismissWarning );
   109 		component.warning.on( 'click', '.file-editor-warning-dismiss', component.dismissWarning );
   326 		 * @since 4.9.0
   326 		 * @since 4.9.0
   327 		 *
   327 		 *
   328 		 * @return {void}
   328 		 * @return {void}
   329 		 */
   329 		 */
   330 		codeEditorSettings.onTabPrevious = function() {
   330 		codeEditorSettings.onTabPrevious = function() {
   331 			$( '#templateside' ).find( ':tabbable' ).last().focus();
   331 			$( '#templateside' ).find( ':tabbable' ).last().trigger( 'focus' );
   332 		};
   332 		};
   333 
   333 
   334 		/**
   334 		/**
   335 		 * Handle tabbing to the field after the editor.
   335 		 * Handle tabbing to the field after the editor.
   336 		 *
   336 		 *
   337 		 * @since 4.9.0
   337 		 * @since 4.9.0
   338 		 *
   338 		 *
   339 		 * @return {void}
   339 		 * @return {void}
   340 		 */
   340 		 */
   341 		codeEditorSettings.onTabNext = function() {
   341 		codeEditorSettings.onTabNext = function() {
   342 			$( '#template' ).find( ':tabbable:not(.CodeMirror-code)' ).first().focus();
   342 			$( '#template' ).find( ':tabbable:not(.CodeMirror-code)' ).first().trigger( 'focus' );
   343 		};
   343 		};
   344 
   344 
   345 		/**
   345 		/**
   346 		 * Handle change to the linting errors.
   346 		 * Handle change to the linting errors.
   347 		 *
   347 		 *
  1021 			};
  1021 			};
  1022 		}
  1022 		}
  1023 	}
  1023 	}
  1024 };
  1024 };
  1025 
  1025 
  1026 wp.themePluginEditor.l10n = window.wp.deprecateL10nObject( 'wp.themePluginEditor.l10n', wp.themePluginEditor.l10n );
  1026 wp.themePluginEditor.l10n = window.wp.deprecateL10nObject( 'wp.themePluginEditor.l10n', wp.themePluginEditor.l10n, '5.5.0' );