diff --git a/packages-content-model/roosterjs-content-model-editor/lib/publicApi/entity/insertEntity.ts b/packages-content-model/roosterjs-content-model-editor/lib/publicApi/entity/insertEntity.ts index 7fafcddff5e..fb65075c93f 100644 --- a/packages-content-model/roosterjs-content-model-editor/lib/publicApi/entity/insertEntity.ts +++ b/packages-content-model/roosterjs-content-model-editor/lib/publicApi/entity/insertEntity.ts @@ -80,7 +80,7 @@ export default function insertEntity( entityModel, typeof position == 'string' ? position : 'focus', isBlock, - isBlock ? focusAfterEntity : true, + focusAfterEntity, context ); diff --git a/packages-content-model/roosterjs-content-model-editor/test/publicApi/entity/insertEntityTest.ts b/packages-content-model/roosterjs-content-model-editor/test/publicApi/entity/insertEntityTest.ts index 1699a15787b..78d865ad001 100644 --- a/packages-content-model/roosterjs-content-model-editor/test/publicApi/entity/insertEntityTest.ts +++ b/packages-content-model/roosterjs-content-model-editor/test/publicApi/entity/insertEntityTest.ts @@ -94,7 +94,7 @@ describe('insertEntity', () => { }, 'begin', false, - true, + undefined, context ); expect(getEntityFromElementSpy).toHaveBeenCalledWith(wrapper); @@ -217,7 +217,7 @@ describe('insertEntity', () => { }, 'begin', false, - true, + undefined, context ); expect(getEntityFromElementSpy).toHaveBeenCalledWith(wrapper);