mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix buggy context-menu behaviour after cdk update (#2672)
This commit is contained in:
committed by
Eugenio Romano
parent
d138d6af16
commit
a62d550325
@@ -66,7 +66,7 @@ export class ContextMenuHolderComponent implements OnInit, OnDestroy {
|
||||
@HostListener('window:resize', ['$event'])
|
||||
onResize(event) {
|
||||
if (this.mdMenuElement) {
|
||||
this.setPosition();
|
||||
this.setPositionAfterCDKrecalculation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,10 +130,16 @@ export class ContextMenuHolderComponent implements OnInit, OnDestroy {
|
||||
this.menuTrigger.openMenu();
|
||||
|
||||
if (this.mdMenuElement) {
|
||||
this.setPosition();
|
||||
this.setPositionAfterCDKrecalculation();
|
||||
}
|
||||
}
|
||||
|
||||
setPositionAfterCDKrecalculation() {
|
||||
setTimeout(() => {
|
||||
this.setPosition();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
get mdMenuElement() {
|
||||
return this.menuElement;
|
||||
}
|
||||
|
Reference in New Issue
Block a user