Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(editor)(fix) Append the edit-post-header-toolbar class in NavigableToolbar for backward compatibility with plugin GUI injections #58154

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/editor/src/components/document-tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,16 @@ function DocumentTools( {
const shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );

return (
// Some plugins expect and use the `edit-post-header-toolbar` CSS class to
// find the toolbar and inject UI elements into it. This is not officially
// supported, but we're keeping it in the list of class names for backwards
// compatibility.
<NavigableToolbar
className={ classnames( 'editor-document-tools', className ) }
className={ classnames(
'editor-document-tools',
'edit-post-header-toolbar',
className
) }
aria-label={ toolbarAriaLabel }
shouldUseKeyboardFocusShortcut={ ! blockToolbarCanBeFocused }
variant="unstyled"
Expand Down
Loading