@portabletext/editor 2.15.0 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -4961,8 +4961,24 @@ const insertChildOperationImplementation = ({
4961
4961
  _key,
4962
4962
  _type,
4963
4963
  ...rest
4964
- } = inlineObject;
4965
- slate.Transforms.insertNodes(operation.editor, {
4964
+ } = inlineObject, [focusSpan] = getFocusSpan({
4965
+ editor: operation.editor
4966
+ });
4967
+ focusSpan ? slate.Transforms.insertNodes(operation.editor, {
4968
+ _key,
4969
+ _type,
4970
+ children: [{
4971
+ _key: VOID_CHILD_KEY,
4972
+ _type: "span",
4973
+ text: "",
4974
+ marks: []
4975
+ }],
4976
+ value: rest,
4977
+ __inline: !0
4978
+ }, {
4979
+ at: focus,
4980
+ select: !0
4981
+ }) : slate.Transforms.insertNodes(operation.editor, {
4966
4982
  _key,
4967
4983
  _type,
4968
4984
  children: [{