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): popup can't show (#3252)

zhangwf1a45fd07fea
diff --git a/packages/sheets-data-validation/src/services/dropdown-manager.service.ts b/packages/sheets-data-validation/src/services/dropdown-manager.service.ts
index 24c4eda23b..c268cc8695 100644
--- a/packages/sheets-data-validation/src/services/dropdown-manager.service.ts
+++ b/packages/sheets-data-validation/src/services/dropdown-manager.service.ts
@@ -138,6 +138,7 @@ export class DataValidationDropdownManagerService extends Disposable {
offset: [0, 3],
excludeOutside: [currentRender?.engine.getCanvasElement()].filter(Boolean) as HTMLElement[],
}
+
);
if (!popupDisposable) {
diff --git a/packages/sheets-ui/src/services/canvas-pop-manager.service.ts b/packages/sheets-ui/src/services/canvas-pop-manager.service.ts
index 5936bbd331..e96f65e6e5 100644
--- a/packages/sheets-ui/src/services/canvas-pop-manager.service.ts
+++ b/packages/sheets-ui/src/services/canvas-pop-manager.service.ts
@@ -165,7 +165,7 @@ export class SheetCanvasPopManagerService extends Disposable {
const unitId = workbook.getUnitId();
const subUnitId = worksheet.getSheetId();
- if (unitId !== _unitId || subUnitId !== _subUnitId) {
+ if ((_unitId && unitId !== _unitId) || (_subUnitId && subUnitId !== _subUnitId)) {
return null;
}
const currentRender = this._renderManagerService.getRenderById(unitId);