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 (#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

1 comment on commit dc40184

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in dc40184.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13269875521
📝 Reported issues:

Please sign in to comment.