Skip to content

Commit

Permalink
Link Format: collapse selection to end after insert
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored and mkaz committed Apr 13, 2020
1 parent 6bcf16a commit d730645
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ function InlineLinkUI( {
);
onChange( insert( value, toInsert ) );
} else {
onChange( applyFormat( value, format ) );
const newValue = applyFormat( value, format );
newValue.start = newValue.end;
newValue.activeFormats = [];
onChange( newValue );
}

// Focus should only be shifted back to the formatted segment when the
Expand Down

0 comments on commit d730645

Please sign in to comment.