Skip to content

Commit

Permalink
Disable the navigation mode when clicking the redirect element (#17798)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored and gziolo committed Oct 15, 2019
1 parent 102cffe commit 3227283
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-editor/src/components/writing-flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ class WritingFlow extends Component {
* Sets focus to the end of the last tabbable text field, if one exists.
*/
focusLastTextField() {
this.disableNavigationMode();
const focusableNodes = focus.focusable.find( this.container );
const target = findLast( focusableNodes, isTabbableTextField );
if ( target ) {
Expand Down
3 changes: 3 additions & 0 deletions packages/e2e-tests/specs/adding-blocks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ describe( 'adding blocks', () => {
}

it( 'Should insert content using the placeholder and the regular inserter', async () => {
// This ensures the editor is loaded in navigation mode.
await page.reload();

// Click below editor to focus last field (block appender)
await clickBelow( await page.$( '.block-editor-default-block-appender' ) );
expect( await page.$( '[data-type="core/paragraph"]' ) ).not.toBeNull();
Expand Down

0 comments on commit 3227283

Please sign in to comment.