cerxos-ui 0.0.10 → 0.0.11

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.
@@ -209,8 +209,10 @@ class CxsActionMenuComponent {
209
209
  setTimeout(() => {
210
210
  const menuEl = this.menu?.nativeElement;
211
211
  const menuRect = menuEl?.getBoundingClientRect();
212
- const menuWidth = menuRect?.width ?? 160;
213
- const menuHeight = menuRect?.height ?? 0;
212
+ const measuredWidth = menuRect?.width ?? 0;
213
+ const measuredHeight = menuRect?.height ?? 0;
214
+ const menuWidth = measuredWidth > 1 ? measuredWidth : 160;
215
+ const menuHeight = measuredHeight > 1 ? measuredHeight : 0;
214
216
  let top = rect.bottom + offset;
215
217
  let left = this.align === 'end' ? rect.right - menuWidth : rect.left;
216
218
  if (top + menuHeight > window.innerHeight) {