Skip to content

Commit

Permalink
Prevent the duplicate form submit
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 10, 2020
1 parent 9338ffa commit 6f498a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ function LinkControl( {
key={ `${ suggestion.id }-${ suggestion.type }` }
itemProps={ buildSuggestionItemProps( suggestion, index ) }
suggestion={ suggestion }
onClick={ () => {
onClick={ ( event ) => {
event.preventDefault();
setIsEditingLink( false );
onChange( { ...value, ...suggestion } );
} }
Expand Down

0 comments on commit 6f498a8

Please sign in to comment.