Skip to content

Commit

Permalink
Added is-focus-mode class on all viewports.
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Nov 28, 2024
1 parent 9a9af21 commit 175cc93
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ import {
useDispatch,
useRegistry,
} from '@wordpress/data';
import {
useViewportMatch,
useMergeRefs,
useDebounce,
} from '@wordpress/compose';
import { useMergeRefs, useDebounce } from '@wordpress/compose';
import {
createContext,
useMemo,
Expand Down Expand Up @@ -46,7 +42,6 @@ export const IntersectionObserver = createContext();
const pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();

function Root( { className, ...settings } ) {
const isLargeViewport = useViewportMatch( 'medium' );
const { isOutlineMode, isFocusMode, temporarilyEditingAsBlocks } =
useSelect( ( select ) => {
const { getSettings, getTemporarilyEditingAsBlocks, isTyping } =
Expand Down Expand Up @@ -105,7 +100,7 @@ function Root( { className, ...settings } ) {
] ),
className: clsx( 'is-root-container', className, {
'is-outline-mode': isOutlineMode,
'is-focus-mode': isFocusMode && isLargeViewport,
'is-focus-mode': isFocusMode,
} ),
},
settings
Expand Down

0 comments on commit 175cc93

Please sign in to comment.