Skip to content

Commit

Permalink
Remove unnecessary isDisabled option on useShortcut for block popover (
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored and artemiomorales committed Jan 4, 2024
1 parent da26701 commit 6fcb00d
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,10 @@ export default function BlockToolbarPopover( {
const { stopTyping } = useDispatch( blockEditorStore );
const isToolbarForced = useRef( false );

useShortcut(
'core/block-editor/focus-toolbar',
() => {
isToolbarForced.current = true;
stopTyping( true );
},
{
isDisabled: false,
}
);
useShortcut( 'core/block-editor/focus-toolbar', () => {
isToolbarForced.current = true;
stopTyping( true );
} );

useEffect( () => {
isToolbarForced.current = false;
Expand Down

0 comments on commit 6fcb00d

Please sign in to comment.