Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(doc): IME input

DR-Univerae6477d7f1d2
diff --git a/packages/base-docs/src/Controller/InputController.ts b/packages/base-docs/src/Controller/InputController.ts
index 369fa2c620..127d526688 100644
--- a/packages/base-docs/src/Controller/InputController.ts
+++ b/packages/base-docs/src/Controller/InputController.ts
@@ -121,7 +121,7 @@ export class InputController {
onCompositionupdateObservable.add((config) => {
const { event, document } = config;
- let cursor = this._previousIMEStart;
+ let cursor = this._previousIMEStart - 1;
const skeleton = document.getSkeleton();
@@ -143,10 +143,6 @@ export class InputController {
// docsModel.insertText(increaseText, cursor);
- if (this._previousIMEContent.length === 0) {
- cursor -= 1;
- }
-
docsModel.updateText(content, this._previousIMEContent, cursor);
skeleton.calculate();