@gravitee/ui-particles-angular 5.1.0 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2116,11 +2116,13 @@ class GioSubmenuComponent {
2116
2116
  this.reduced = true;
2117
2117
  this.loaded = true;
2118
2118
  }), switchMap(() => this.gioMenuService.overlayObservable), tap(overlayOptions => {
2119
- const top = overlayOptions.top || 0;
2120
2119
  this.overlayOptions = overlayOptions;
2121
- this.gioSubmenu.nativeElement.style.top = `${top}px`;
2122
- this.gioSubmenu.nativeElement.style.height = 'auto';
2123
- this.gioSubmenu.nativeElement.style.maxHeight = `calc(100vh - ${top + 8}px)`;
2120
+ if (overlayOptions.open) {
2121
+ const top = overlayOptions.top || 0;
2122
+ this.gioSubmenu.nativeElement.style.top = `${top}px`;
2123
+ this.gioSubmenu.nativeElement.style.height = 'auto';
2124
+ this.gioSubmenu.nativeElement.style.maxHeight = `calc(100vh - ${top + 8}px)`;
2125
+ }
2124
2126
  }), filter(overlayOptions => !!overlayOptions.focus), delay(200), switchMap(() => of(this.gioSubmenu.nativeElement.querySelectorAll('gio-submenu-item'))), filter(submenuItems => submenuItems.length > 0), tap(submenuItems => submenuItems[0].focus()))
2125
2127
  .subscribe();
2126
2128
  this.gioMenuService.reduce
@@ -2146,7 +2148,7 @@ class GioSubmenuComponent {
2146
2148
  }
2147
2149
  onKeydownHandler(event) {
2148
2150
  of(this.reduced && event.key === 'Escape')
2149
- .pipe(filter(reducedAndEcape => reducedAndEcape), tap(() => this.gioMenuService.overlay({ open: false })), delay(100), tap(() => this.overlayOptions.parent?.focus()))
2151
+ .pipe(filter(reducedAndEscape => reducedAndEscape), tap(() => this.gioMenuService.overlay({ open: false })), delay(100), tap(() => this.overlayOptions.parent?.focus()))
2150
2152
  .subscribe();
2151
2153
  }
2152
2154
  }