Skip to content

Commit

Permalink
Prevent sidebar focus in site editor on small screens (#55934)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Nov 8, 2023
1 parent 16bb053 commit a880f38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function Layout() {
} );
const disableMotion = useReducedMotion();
const showSidebar =
( isMobileViewport && ! isListPage ) ||
( isMobileViewport && canvasMode === 'view' && ! isListPage ) ||
( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );
const showCanvas =
( isMobileViewport && isEditorPage && isEditing ) ||
Expand Down Expand Up @@ -282,7 +282,7 @@ export default function Layout() {
// (https://github.com/WordPress/gutenberg/pull/51558/files#r1231763003),
// so we can't remove the element entirely. Using `inert` will make
// it inaccessible to screen readers and keyboard navigation.
inert={ showSidebar ? undefined : 'inert' }
inert={ showSidebar ? undefined : 'true' }
animate={ { opacity: showSidebar ? 1 : 0 } }
transition={ {
type: 'tween',
Expand Down

0 comments on commit a880f38

Please sign in to comment.