mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-26 17:24:45 +00:00
[ACA-2208] Hide app menu on swipe (#970)
This commit is contained in:
parent
9458ce1785
commit
c7328c7caf
@ -178,4 +178,20 @@ describe('AppLayoutComponent', () => {
|
||||
|
||||
expect(component.layout.container.toggleMenu).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should close menu on mobile screen size also when minimizeSidenav true', () => {
|
||||
fixture.detectChanges();
|
||||
component.minimizeSidenav = true;
|
||||
component.layout.container = {
|
||||
isMobileScreenSize: true,
|
||||
toggleMenu: () => {}
|
||||
};
|
||||
|
||||
spyOn(component.layout.container, 'toggleMenu');
|
||||
fixture.detectChanges();
|
||||
|
||||
component.hideMenu(<any>{ preventDefault: () => {} });
|
||||
|
||||
expect(component.layout.container.toggleMenu).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
@ -153,7 +153,7 @@ export class AppLayoutComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
hideMenu(event: Event) {
|
||||
if (!this.minimizeSidenav && this.layout.container.isMobileScreenSize) {
|
||||
if (this.layout.container.isMobileScreenSize) {
|
||||
event.preventDefault();
|
||||
this.layout.container.toggleMenu();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user