Skip to content

Commit

Permalink
Writing Flow: restore early return for no block selection in tab nav …
Browse files Browse the repository at this point in the history
…hook (WordPress#69079)

Co-authored-by: Mayank-Tripathi32 <[email protected]>
Co-authored-by: stokesman <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: singhakanshu00 <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
6 people authored Feb 11, 2025
1 parent 2988195 commit dc40184
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ export default function useTabNav() {
return;
}

if ( ! hasMultiSelection() && ! getSelectedBlockClientId() ) {
return;
}

const isShift = event.shiftKey;
const direction = isShift ? 'findPrevious' : 'findNext';
const nextTabbable = focus.tabbable[ direction ]( event.target );
Expand Down

0 comments on commit dc40184

Please sign in to comment.