diff --git a/client/src/app/directives/directives.module.ts b/client/src/app/directives/directives.module.ts index c919ee0..404e2b4 100644 --- a/client/src/app/directives/directives.module.ts +++ b/client/src/app/directives/directives.module.ts @@ -4,20 +4,23 @@ import { NgVarDirective } from './ng-var.directive' import { DragNdropDirective } from './drag-ndrop.directive' import { FileDropDirective } from './file-drop.directive' import { FileSelectDirective } from './file-select.directive' +import { StealFocusDirective } from './steal-focus.directive' @NgModule({ declarations: [ NgVarDirective, DragNdropDirective, FileDropDirective, - FileSelectDirective + FileSelectDirective, + StealFocusDirective ], imports: [CommonModule], exports: [ NgVarDirective, DragNdropDirective, FileDropDirective, - FileSelectDirective + FileSelectDirective, + StealFocusDirective ] }) export class DirectivesModule {} diff --git a/client/src/app/directives/steal-focus.directive.ts b/client/src/app/directives/steal-focus.directive.ts new file mode 100644 index 0000000..d806090 --- /dev/null +++ b/client/src/app/directives/steal-focus.directive.ts @@ -0,0 +1,18 @@ +import { Directive, HostListener } from '@angular/core'; + +@Directive({ + selector: '[appStealFocus]' +}) +export class StealFocusDirective { + + constructor() { } + + /** + * For some reason newest version of Clarity v17.0.1 is stealing focus when + * clicking on the input inside of the clr-tree-view + * This is workaround + */ + @HostListener('click', ['$event']) onClick(event: any){ + event.target.focus() + } +} diff --git a/client/src/app/group/group.component.html b/client/src/app/group/group.component.html index 509113d..653127f 100644 --- a/client/src/app/group/group.component.html +++ b/client/src/app/group/group.component.html @@ -3,7 +3,7 @@
{ if (library.LIBRARYID !== libraryToSkip.LIBRARYID) { diff --git a/client/src/app/lineage/lineage.component.html b/client/src/app/lineage/lineage.component.html index 97efde2..f9c4b4b 100644 --- a/client/src/app/lineage/lineage.component.html +++ b/client/src/app/lineage/lineage.component.html @@ -3,7 +3,7 @@