diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts index b691bd9c5..9e4809505 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { PermissionsService } from '@services/permissions.service'; import { Debounce, IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui'; import { TranslateService } from '@ngx-translate/core'; @@ -38,6 +38,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit constructor( readonly permissionsService: PermissionsService, private readonly _rulesService: RulesService, + private readonly _changeDetectorRef: ChangeDetectorRef, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _toaster: Toaster, protected readonly _translateService: TranslateService, @@ -74,6 +75,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit }, }); (window as any).monaco.editor.setTheme('redaction'); + this._changeDetectorRef.detectChanges(); } @Debounce() @@ -106,6 +108,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit revert(): void { this.currentLines = this.initialLines; this._decorations = this._codeEditor?.deltaDecorations(this._decorations, []) || []; + this._changeDetectorRef.detectChanges(); this._loadingService.stop(); } diff --git a/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts b/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts index e441e1dd1..54ea63b1f 100644 --- a/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts +++ b/apps/red-ui/src/app/modules/dossier/utils/pdf-viewer.utils.ts @@ -109,6 +109,12 @@ export class PdfViewerUtils { for (const hotkey of DISABLED_HOTKEYS) { this.instance.UI.hotkeys.off(hotkey); } + console.log('disable', this.instance); + this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.DOWN); + this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.UP); + this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.PAGE_UP); + this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.PAGE_DOWN); + this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.P); } translateQuads(page: number, quads: any) { @@ -121,7 +127,7 @@ export class PdfViewerUtils { } selectAnnotations(annotations?: AnnotationWrapper[], multiSelectActive: boolean = false) { - if (!annotations){ + if (!annotations) { return; } if (!multiSelectActive) {