mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-3808] - fix e2e actionMenu (#1580)
* fix e2e actionMenu * PR changes * wait for context menu to close * wait for menu to close after escape key Co-authored-by: Silviu Popa <p3701014@L3700101120.ness.com>
This commit is contained in:
@@ -23,8 +23,9 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, Input, ViewEncapsulation, HostListener, ViewChild } from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
|
||||
@Component({
|
||||
selector: 'app-toolbar-menu',
|
||||
@@ -39,6 +40,13 @@ export class ToolbarMenuComponent {
|
||||
@Input()
|
||||
color = '';
|
||||
|
||||
@ViewChild('matTrigger') matTrigger: MatMenuTrigger;
|
||||
|
||||
@HostListener('document:keydown.Escape')
|
||||
handleKeydownEscape() {
|
||||
this.matTrigger.closeMenu();
|
||||
}
|
||||
|
||||
get hasChildren(): boolean {
|
||||
return this.actionRef && this.actionRef.children && this.actionRef.children.length > 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user