Skip to content

Commit

Permalink
Set navigation mode on editor mount
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Aug 5, 2020
1 parent 9bbfc36 commit cf3088d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { useState, useMemo, useCallback } from '@wordpress/element';
import { useState, useMemo, useCallback, useEffect } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import {
SlotFillProvider,
Expand Down Expand Up @@ -101,6 +101,13 @@ function Editor() {
const { editEntityRecord } = useDispatch( 'core' );
const { setPage } = useDispatch( 'core/edit-site' );

const { setNavigationMode } = useDispatch( 'core/block-editor' );

// Set editor to navigation mode on component mount.
useEffect( () => {
setNavigationMode( true );
}, [ true ] );

const inlineStyles = useResizeCanvas( deviceType );

const [
Expand Down

0 comments on commit cf3088d

Please sign in to comment.