RED-5238: fix auto select annotation on win virtual desktops
This commit is contained in:
parent
d04c63c8f5
commit
199abf525d
@ -214,18 +214,19 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy
|
||||
return;
|
||||
}
|
||||
|
||||
if ($event.key === 'ArrowLeft') {
|
||||
if (!$event.metaKey && !$event.ctrlKey && $event.key === 'ArrowLeft') {
|
||||
this.pagesPanelActive = true;
|
||||
this._changeDetectorRef.markForCheck();
|
||||
return;
|
||||
}
|
||||
|
||||
if ($event.key === 'ArrowRight') {
|
||||
if (!$event.metaKey && !$event.ctrlKey && $event.key === 'ArrowRight') {
|
||||
this.pagesPanelActive = false;
|
||||
// if we activated annotationsPanel -
|
||||
// select first annotation from this page in case there is no
|
||||
// selected annotation on this page and not in multi select mode
|
||||
if (!this.pagesPanelActive && !this.multiSelectService.isActive) {
|
||||
this._documentViewer.clearSelection();
|
||||
this._selectFirstAnnotationOnCurrentPageIfNecessary();
|
||||
}
|
||||
this._changeDetectorRef.markForCheck();
|
||||
|
||||
@ -80,6 +80,11 @@ export class REDDocumentViewer {
|
||||
return merge(this.#documentUnloaded$, this.#documentLoaded$).pipe(shareLast());
|
||||
}
|
||||
|
||||
clearSelection() {
|
||||
this.#document.clearSelection();
|
||||
this.#pdf.disable('textPopup');
|
||||
}
|
||||
|
||||
close() {
|
||||
this.#logger.info('[PDF] Closing document');
|
||||
this.#document.closeDocument();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user