mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-2075] Create Library dialog is not focused when opening it for the second time (#863)
* remove autofocus property * let dialog focus elements * remove autoFocus dialog configs * autoFocus default config
This commit is contained in:
parent
904c08461d
commit
ec3eeb7a63
@ -6,7 +6,6 @@
|
|||||||
<input
|
<input
|
||||||
placeholder="{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}"
|
placeholder="{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}"
|
||||||
required
|
required
|
||||||
autofocus
|
|
||||||
matInput
|
matInput
|
||||||
formControlName="title"
|
formControlName="title"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
@ -57,7 +57,7 @@ import {
|
|||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: MAT_DIALOG_DEFAULT_OPTIONS,
|
provide: MAT_DIALOG_DEFAULT_OPTIONS,
|
||||||
useValue: { closeOnNavigation: true, hasBackdrop: true }
|
useValue: { closeOnNavigation: true, hasBackdrop: true, autoFocus: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -236,13 +236,6 @@ export class ContentManagementService {
|
|||||||
this.store.dispatch(new SnackbarErrorAction(message));
|
this.store.dispatch(new SnackbarErrorAction(message));
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo: add focus in ADF component
|
|
||||||
dialogInstance
|
|
||||||
.afterOpened()
|
|
||||||
.subscribe(() =>
|
|
||||||
(<HTMLElement>document.querySelector('#adf-folder-name-input')).focus()
|
|
||||||
);
|
|
||||||
|
|
||||||
dialogInstance.afterClosed().subscribe(node => {
|
dialogInstance.afterClosed().subscribe(node => {
|
||||||
if (node) {
|
if (node) {
|
||||||
this.folderCreated.next(node);
|
this.folderCreated.next(node);
|
||||||
@ -266,13 +259,6 @@ export class ContentManagementService {
|
|||||||
this.store.dispatch(new SnackbarErrorAction(message));
|
this.store.dispatch(new SnackbarErrorAction(message));
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo: add focus in ADF component
|
|
||||||
dialog
|
|
||||||
.afterOpened()
|
|
||||||
.subscribe(() =>
|
|
||||||
(<HTMLElement>document.querySelector('#adf-folder-name-input')).focus()
|
|
||||||
);
|
|
||||||
|
|
||||||
dialog.afterClosed().subscribe((node: MinimalNodeEntryEntity) => {
|
dialog.afterClosed().subscribe((node: MinimalNodeEntryEntity) => {
|
||||||
if (node) {
|
if (node) {
|
||||||
this.folderEdited.next(node);
|
this.folderEdited.next(node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user