[ACS-3757] returning focus to element from which they were opened (#8034)

* ACS-3757 Focus first focusable element in modals and allow to autofocus specific element after modal closing

* ACS-3757 Added possibility for autofocus after closing some modals, marking datatable row as source of context menu, fixing tests

* ACS-3757 Run lint

* ACS-3757 Updated documentation

* ACS-3757 Added unit tests

* ACS-3757 Replaced toHaveBeenCalledWith with toHaveBeenCalled and removed testing all falsy
This commit is contained in:
AleksanderSklorz
2022-12-13 11:55:46 +01:00
committed by GitHub
parent ef278bde79
commit c1cffa9cfb
12 changed files with 164 additions and 11 deletions

View File

@@ -30,8 +30,8 @@ export class NodeAspectService {
private cardViewUpdateService: CardViewUpdateService) {
}
updateNodeAspects(nodeId: string) {
this.dialogAspectListService.openAspectListDialog(nodeId).subscribe((aspectList) => {
updateNodeAspects(nodeId: string, selectorAutoFocusedOnClose?: string) {
this.dialogAspectListService.openAspectListDialog(nodeId, selectorAutoFocusedOnClose).subscribe((aspectList) => {
this.nodesApiService.updateNode(nodeId, { aspectNames: [...aspectList] }).subscribe((updatedNode) => {
this.alfrescoApiService.nodeUpdated.next(updatedNode);
this.cardViewUpdateService.updateNodeAspect(updatedNode);