Skip to content

Commit

Permalink
Fix link interface. (#14052)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioEstevao authored and hypest committed Feb 22, 2019
1 parent 331b68d commit 0cbf01c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/format-library/src/link/modal.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ModalLinkUI extends Component {
const placeholderFormats = ( value.formatPlaceholder && value.formatPlaceholder.formats ) || [];

if ( isCollapsed( value ) && ! isActive ) { // insert link
const toInsert = applyFormat( create( { text: linkText } ), [ ...placeholderFormats, format ], 0, text.length );
const toInsert = applyFormat( create( { text: linkText } ), [ ...placeholderFormats, format ], 0, linkText.length );
onChange( insert( value, toInsert ) );
} else if ( text !== getTextContent( slice( value ) ) ) { // edit text in selected link
const toInsert = applyFormat( create( { text } ), [ ...placeholderFormats, format ], 0, text.length );
Expand Down

0 comments on commit 0cbf01c

Please sign in to comment.