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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheets-ui): dispose univer error (#5328)
WEI ZHANG95690553cccf
diff --git a/packages/sheets-ui/src/services/canvas-pop-manager.service.ts b/packages/sheets-ui/src/services/canvas-pop-manager.service.tsindex 7624864b1f..69b814d4f5 100644--- a/packages/sheets-ui/src/services/canvas-pop-manager.service.ts+++ b/packages/sheets-ui/src/services/canvas-pop-manager.service.ts@@ -652,6 +652,14 @@ export class SheetCanvasPopManagerService extends Disposable {};const canvasElement = engine.getCanvasElement();+ if (!canvasElement) {+ return {+ left: 0,+ right: 0,+ top: 0,+ bottom: 0,+ };+ }const canvasClientRect = canvasElement.getBoundingClientRect();// We should take the scale into account when canvas is scaled by CSS.