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(docs-ui): popup direction (#4846)

ZhangWeid8b3b65c5d54
diff --git a/packages/docs-ui/src/services/doc-popup-manager.service.ts b/packages/docs-ui/src/services/doc-popup-manager.service.ts
index 8590043e3e..d551dc6daf 100644
--- a/packages/docs-ui/src/services/doc-popup-manager.service.ts
+++ b/packages/docs-ui/src/services/doc-popup-manager.service.ts
@@ -288,7 +288,7 @@ export class DocCanvasPopManagerService extends Disposable {
anchorRect$: position$,
excludeRects: bounds,
excludeRects$: bounds$,
- direction: (['top', 'bottom', 'horizontal'].includes(direction)) ?
+ direction: (['top', 'bottom', 'horizontal'].some((i) => direction.includes(i))) ?
bounds.length > 1 ? multipleDirection ?? direction : direction
: 'bottom',
canvasElement: currentRender.engine.getCanvasElement(),