mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-3757] returning focus to element from which they were opened (#2837)
* ACS-3757 Return focus to More Actions button after closing modals opened from that button * ACS-3757 Return focus to specific row from personal files after closing modal opened from context menu from row * ACS-3757 Fixed issue that sometimes node was undefined * ACS-3757 Return focus after closing upload new version modal * ACS-3757 Added restore focus on list of libraries, restoring focus to correct row when multi rows are selected, little refactoring * ACS-3757 Use runActionById function instead of runAction * ACS-3757 Fixed unit tests * ACS-3757 Updated description * ACS-3757 Adrressing comments for static and for selectors in jsons * ACS-3757 Remove boolean flag from jsons * ACS-3757 Added some unit tests * ACS-3757 Resolved conflicts * ACS-3757 Created ModalConfiguration interface * ACS-3757 Increase version of ADF * ACS-3757 Fix for e2e * ACS-3757 Fix some more e2e * ACS-3757 Removed log
This commit is contained in:
@@ -53,7 +53,9 @@ export class ToolbarButtonComponent {
|
||||
|
||||
runAction() {
|
||||
if (this.hasClickAction(this.actionRef)) {
|
||||
this.extensions.runActionById(this.actionRef.actions.click);
|
||||
this.extensions.runActionById(this.actionRef.actions.click, {
|
||||
focusedElementOnCloseSelector: `#${this.actionRef.id.replace(/\./g, '\\.')}`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,8 @@ import { MatMenuItem } from '@angular/material/menu';
|
||||
export class ToolbarMenuItemComponent {
|
||||
@Input()
|
||||
actionRef: ContentActionRef;
|
||||
@Input()
|
||||
menuId?: string;
|
||||
|
||||
@ViewChild(MatMenuItem)
|
||||
menuItem: MatMenuItem;
|
||||
@@ -52,7 +54,14 @@ export class ToolbarMenuItemComponent {
|
||||
|
||||
runAction() {
|
||||
if (this.hasClickAction(this.actionRef)) {
|
||||
this.extensions.runActionById(this.actionRef.actions.click);
|
||||
this.extensions.runActionById(
|
||||
this.actionRef.actions.click,
|
||||
this.menuId
|
||||
? {
|
||||
focusedElementOnCloseSelector: `#${this.menuId.replace(/\./g, '\\.')}`
|
||||
}
|
||||
: undefined
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<adf-dynamic-component [id]="child.component" [data]="child.data"></adf-dynamic-component>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchDefault>
|
||||
<app-toolbar-menu-item [actionRef]="child"></app-toolbar-menu-item>
|
||||
<app-toolbar-menu-item [actionRef]="child" [menuId]="actionRef.id"></app-toolbar-menu-item>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
Reference in New Issue
Block a user