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.

feat(docs-ui): add click event handling to hide paragraph menu (#4968)

ZhangWei3a49e636a360
diff --git a/packages/docs-ui/src/services/doc-paragraph-menu.service.ts b/packages/docs-ui/src/services/doc-paragraph-menu.service.ts
index e4732d20f3..85635bc3b3 100644
--- a/packages/docs-ui/src/services/doc-paragraph-menu.service.ts
+++ b/packages/docs-ui/src/services/doc-paragraph-menu.service.ts
@@ -122,6 +122,10 @@ export class DocParagraphMenuService extends Disposable implements IRenderModule
lastScrollY = e.scrollY;
this.hideParagraphMenu(true);
}));
+
+ this.disposeWithMe(this._docEventManagerService.clickCustomRanges$.subscribe(() => {
+ this.hideParagraphMenu(true);
+ }));
}
showParagraphMenu(paragraph: IMutiPageParagraphBound) {