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(sheets-ui): fix focusout issue with rename input box in lower version of React (#2662)

白熱6f744508c01b
diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts
index ed96153844..9c3598d10b 100644
--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts
+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.ts
@@ -133,7 +133,7 @@ export class SlideTabItem {
if (input) {
input.removeAttribute('contentEditable');
- input.removeEventListener('blur', blurAction);
+ input.removeEventListener('focusout', blurAction);
input.removeEventListener('compositionstart', compositionstartAction);
input.removeEventListener('compositionend', compositionendAction);
input.removeEventListener('input', inputAction);
@@ -189,7 +189,7 @@ export class SlideTabItem {
if (input) {
input.setAttribute('contentEditable', 'true');
- input.addEventListener('blur', blurAction);
+ input.addEventListener('focusout', blurAction);
input.addEventListener('compositionstart', compositionstartAction);
input.addEventListener('compositionend', compositionendAction);
input.addEventListener('input', inputAction);