Skip to content

Commit

Permalink
Remove useCanvasClickRedirect
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Nov 23, 2021
1 parent 2270ee9 commit 8f90864
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ export function DefaultBlockAppender( {
>
<p
tabIndex="0"
// Only necessary for `useCanvasClickRedirect` to consider it
// as a target. Ideally it should consider any tabbable target,
// but the inserter is rendered in place while it should be
// rendered in a popover, just like it does for an empty
// paragraph block.
contentEditable
suppressContentEditableWarning
// We want this element to be styled as a paragraph by themes.
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,7 @@
display: flex;
}
}

.block-editor-default-block-appender__content {
cursor: text;
}
1 change: 0 additions & 1 deletion packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export {
} from './typewriter';
export { default as Warning } from './warning';
export { default as WritingFlow } from './writing-flow';
export { useCanvasClickRedirect as __unstableUseCanvasClickRedirect } from './use-canvas-click-redirect';
export { default as useBlockDisplayInformation } from './use-block-display-information';
export { default as __unstableIframe } from './iframe';
export { default as __experimentalUseNoRecursiveRenders } from './use-no-recursive-renders';
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
__unstableUseTypingObserver as useTypingObserver,
__unstableBlockSettingsMenuFirstItem,
__experimentalUseResizeCanvas as useResizeCanvas,
__unstableUseCanvasClickRedirect as useCanvasClickRedirect,
__unstableEditorStyles as EditorStyles,
useSetting,
__experimentalLayoutStyle as LayoutStyle,
Expand Down Expand Up @@ -153,7 +152,6 @@ export default function VisualEditor( { styles } ) {
const contentRef = useMergeRefs( [
ref,
useClipboardHandler(),
useCanvasClickRedirect(),
useTypewriter(),
useTypingObserver(),
useBlockSelectionClearer(),
Expand Down

0 comments on commit 8f90864

Please sign in to comment.