From 42eef62fa22d672cfc1418efcbb77979a1418500 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 9 Jan 2024 14:37:23 +0200 Subject: [PATCH] RED-8151: fixed maximum call stack error. --- .../app/modules/file-preview/services/pdf-proxy.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index 817a66ded..2d4019d05 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -390,9 +390,10 @@ export class PdfProxyService { } const annotationChangesAllowed = !this.#isDocumine || !this._state.file().excludedFromAutomaticAnalysis; - actions = this._multiSelectService.inactive() - ? [...actions, ...this._pdfAnnotationActionsService.get(annotationWrappers, annotationChangesAllowed)] - : []; + actions = + this._multiSelectService.inactive() && !this._documentViewer.selectedText.length + ? [...actions, ...this._pdfAnnotationActionsService.get(annotationWrappers, annotationChangesAllowed)] + : []; this._pdf.instance.UI.annotationPopup.update(actions); }