From 5f309bffe0ecc680896b28bf84378f40f92c8340 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Fri, 18 Oct 2024 14:35:52 +0300 Subject: [PATCH] RED-9944 - Action Items don't appear in document area in webviewer when bulk-select is still unintenionally active --- .../file-preview/file-preview-screen.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index b3c28bfaf..ad3c9c902 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -279,10 +279,17 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni } @Bind() - handleViewerClick() { + handleViewerClick(event: MouseEvent) { this._ngZone.run(() => { if (this._multiSelectService.active()) { - this._multiSelectService.deactivate(); + const clickedElement = event.target as HTMLElement; + if (clickedElement.querySelector('#selectionrect')) { + if (!this._annotationManager.selected.length) { + this._multiSelectService.deactivate(); + } + } else { + this._multiSelectService.deactivate(); + } } }); }