From f33716361a9e4327eb8fa97adc898d4ab6d08bbb Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 22 Feb 2019 11:45:36 +0000 Subject: [PATCH] Fix link interface. --- packages/format-library/src/link/modal.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/format-library/src/link/modal.native.js b/packages/format-library/src/link/modal.native.js index 0b0accadc9ea58..765cbb5b455d35 100644 --- a/packages/format-library/src/link/modal.native.js +++ b/packages/format-library/src/link/modal.native.js @@ -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 );