Skip to content

Commit

Permalink
Navigation Link: Match Editor Markup to Rendered
Browse files Browse the repository at this point in the history
Closes #28575
  • Loading branch information
George Hotelling committed Mar 17, 2021
1 parent 2f1b4dc commit e42b20e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ export default function NavigationLinkEdit( {
</PanelBody>
</InspectorControls>
<li { ...blockProps }>
<div className={ classes }>
{/* eslint-disable jsx-a11y/anchor-is-valid */}
<a className={ classes }>
{/* eslint-enable */}
{ ! url ? (
<div className="wp-block-navigation-link__placeholder-text">
<KeyboardShortcuts
Expand Down Expand Up @@ -550,7 +552,7 @@ export default function NavigationLinkEdit( {
/>
</Popover>
) }
</div>
</a>
{ hasDescendants && showSubmenuIcon && (
<span className="wp-block-navigation-link__submenu-icon">
<ItemSubmenuIcon />
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
display: block;
}

.wp-block-navigation-link__content {
cursor: text;
}

&.is-editing,
&.is-selected {
min-width: 20px;
Expand Down

0 comments on commit e42b20e

Please sign in to comment.