Skip to content

Commit

Permalink
Enable backspace to remove empty Navigation Links.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Apr 21, 2020
1 parent 7968fcb commit 9884040
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function NavigationLinkEdit( {
rgbBackgroundColor,
saveEntityRecord,
userCanCreatePages = false,
onReplace,
} ) {
const { label, opensInNewTab, url, nofollow, description } = attributes;
const link = {
Expand Down Expand Up @@ -218,6 +219,7 @@ function NavigationLinkEdit( {
onChange={ ( labelValue ) =>
setAttributes( { label: labelValue } )
}
onRemove={ () => onReplace( [] ) }
placeholder={ itemLabelPlaceholder }
keepPlaceholderOnFocus
withoutInteractiveFormatting
Expand Down

0 comments on commit 9884040

Please sign in to comment.