File tree Expand file tree Collapse file tree
packages/block-library/src/image Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -592,12 +592,6 @@ export default function Image( {
592592 />
593593 ) ) ;
594594
595- const resetContentAttributes = ( ) => {
596- setAttributes ( {
597- alt : undefined ,
598- } ) ;
599- } ;
600-
601595 const resetSettings = ( ) => {
602596 setAttributes ( {
603597 lightbox : undefined ,
@@ -783,13 +777,14 @@ export default function Image( {
783777 < InspectorControls group = "content" >
784778 < ToolsPanel
785779 label = { __ ( 'Media' ) }
786- resetAll = { resetContentAttributes }
780+ resetAll = { ( ) => onSelectImage ( undefined ) }
787781 dropdownMenuProps = { dropdownMenuProps }
788782 >
789783 { isSingleSelected && ! lockUrlControls && (
790784 < ToolsPanelItem
791785 label = { __ ( 'Image' ) }
792786 hasValue = { ( ) => ! ! url }
787+ onDeselect = { ( ) => onSelectImage ( undefined ) }
793788 isShownByDefault
794789 >
795790 < MediaControl
You can’t perform that action at this time.
0 commit comments