diff --git a/ts_web/elements/wysiwyg/dees-formatting-menu.ts b/ts_web/elements/wysiwyg/dees-formatting-menu.ts index dea2918..3b281a0 100644 --- a/ts_web/elements/wysiwyg/dees-formatting-menu.ts +++ b/ts_web/elements/wysiwyg/dees-formatting-menu.ts @@ -46,10 +46,14 @@ export class DeesFormattingMenu extends DeesElement { :host { position: fixed; pointer-events: none; + top: 0; + left: 0; + width: 0; + height: 0; } .formatting-menu { - position: absolute; + position: fixed; background: ${cssManager.bdTheme('#ffffff', '#262626')}; border: 1px solid ${cssManager.bdTheme('#e0e0e0', '#404040')}; border-radius: 6px; @@ -159,12 +163,12 @@ export class DeesFormattingMenu extends DeesElement { this.position = position; this.callback = callback; - // Get z-index from registry + // Get z-index from registry and apply immediately this.menuZIndex = zIndexRegistry.getNextZIndex(); zIndexRegistry.register(this, this.menuZIndex); + this.style.zIndex = this.menuZIndex.toString(); this.visible = true; - console.log('FormattingMenu.show - visible set to:', this.visible); } public hide(): void { diff --git a/ts_web/elements/wysiwyg/dees-slash-menu.ts b/ts_web/elements/wysiwyg/dees-slash-menu.ts index e0e7dbd..22d0f33 100644 --- a/ts_web/elements/wysiwyg/dees-slash-menu.ts +++ b/ts_web/elements/wysiwyg/dees-slash-menu.ts @@ -1,6 +1,5 @@ import { customElement, - property, html, DeesElement, type TemplateResult, @@ -54,10 +53,14 @@ export class DeesSlashMenu extends DeesElement { :host { position: fixed; pointer-events: none; + top: 0; + left: 0; + width: 0; + height: 0; } .slash-menu { - position: absolute; + position: fixed; background: ${cssManager.bdTheme('#ffffff', '#262626')}; border: 1px solid ${cssManager.bdTheme('#e0e0e0', '#404040')}; border-radius: 8px; @@ -121,7 +124,7 @@ export class DeesSlashMenu extends DeesElement { render(): TemplateResult { if (!this.visible) return html``; - // Apply z-index to host element + // Ensure z-index is applied to host element this.style.zIndex = this.menuZIndex.toString(); const menuItems = this.getFilteredMenuItems(); @@ -168,9 +171,10 @@ export class DeesSlashMenu extends DeesElement { this.filter = ''; this.selectedIndex = 0; - // Get z-index from registry + // Get z-index from registry and apply immediately this.menuZIndex = zIndexRegistry.getNextZIndex(); zIndexRegistry.register(this, this.menuZIndex); + this.style.zIndex = this.menuZIndex.toString(); this.visible = true; } diff --git a/ts_web/pages/zindex-showcase.ts b/ts_web/pages/zindex-showcase.ts index b8b63fa..ca1485c 100644 --- a/ts_web/pages/zindex-showcase.ts +++ b/ts_web/pages/zindex-showcase.ts @@ -12,7 +12,7 @@ import '../elements/dees-input-tags.js'; import '../elements/dees-input-wysiwyg.js'; import '../elements/dees-appui-profiledropdown.js'; -export const showcasePage = () => html` +export const zIndexShowcase = () => html`