Skip to content

Commit

Permalink
Doc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 9, 2020
1 parent e5b1c57 commit ec289de
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/components/src/higher-order/with-focus-return/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function isComponentLike( object ) {
* when the component is unmounted.
*
* @param {(WPComponent|Object)} options The component to be enhanced with
* focus return behavior, or an object
* describing the component and the
* focus return characteristics.
* focus return behavior, or an object
* describing the component and the
* focus return characteristics.
*
* @return {WPComponent} Component with the focus restauration behaviour.
*/
Expand Down Expand Up @@ -65,11 +65,12 @@ function withFocusReturn( options ) {
return;
}

// Defer to the component's own explicit focus return behavior,
// if specified. The function should return `false` to prevent
// the default behavior otherwise occurring here. This allows
// for support that the `onFocusReturn` decides to allow the
// default behavior to occur under some conditions.
// Defer to the component's own explicit focus return
// behavior, if specified. The function should return
// `false` to prevent the default behavior otherwise
// occurring here. This allows for support that the
// `onFocusReturn` decides to allow the default behavior to
// occur under some conditions.
if ( onFocusReturn() === false ) {
return;
}
Expand Down

0 comments on commit ec289de

Please sign in to comment.