Skip to content

Commit

Permalink
Revert putting the caret at end when we transform the selected text i…
Browse files Browse the repository at this point in the history
…nto link
  • Loading branch information
pinarol committed Mar 12, 2019
1 parent 5a6bc8c commit a1e2ab1
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 @@ -94,7 +94,7 @@ class ModalLinkUI extends Component {
onChange( { ...newAttributes, needsSelectionUpdate: true } );
} else { // transform selected text into link
const newAttributes = applyFormat( value, [ ...placeholderFormats, format ] );
onChange( { ...newAttributes, start: newAttributes.end, needsSelectionUpdate: true } ); //put caret at the end of the link
onChange( { ...newAttributes, needsSelectionUpdate: true } );
}

if ( ! isValidHref( url ) ) {
Expand Down

0 comments on commit a1e2ab1

Please sign in to comment.