#9 bug: sidebar menu unclickable on text2img page

Închis
deschis 3 luni în urmă cu fszontagh · 2 comentarii

When navigating to the Text to Image page, the sidebar menu items become unclickable - cannot navigate to other pages.

Steps to reproduce:

  1. Navigate to Text to Image page (http://0.0.0.0:8082/ui/text2img/)
  2. Try to click on other menu items (Models, Queue, etc.)
  3. Clicks don't register - menu items are not clickable

Current behavior: Menu items appear clickable but clicks have no effect on the text2img page specifically.

Expected behavior: Menu should be clickable on all pages including text2img.

Note: Other pages (img2img, upscaler, queue, models) work fine - issue is specific to text2img page.

When navigating to the Text to Image page, the sidebar menu items become unclickable - cannot navigate to other pages. **Steps to reproduce:** 1. Navigate to Text to Image page (http://0.0.0.0:8082/ui/text2img/) 2. Try to click on other menu items (Models, Queue, etc.) 3. Clicks don't register - menu items are not clickable **Current behavior:** Menu items appear clickable but clicks have no effect on the text2img page specifically. **Expected behavior:** Menu should be clickable on all pages including text2img. **Note:** Other pages (img2img, upscaler, queue, models) work fine - issue is specific to text2img page.
Szontágh Ferenc a comentat 3 luni în urmă
Proprietar

Fixed in commit eac0d80

Root Cause: The sidebar had z-index 40, which created potential stacking context conflicts with other UI elements. While most elements had lower z-index values (Header: 30, PromptTextarea suggestions: 30), the combination of sticky positioning and overlapping elements could cause click events to be blocked on certain pages like text2img.

Solution: Increased sidebar z-index from 40 to 50 to ensure it's always the topmost clickable element in the UI.

Changes: Modified webui/components/sidebar.tsx (line 20):

// Before:
<aside className="fixed left-0 top-0 z-40 h-screen w-64 border-r border-border bg-card">

// After:
<aside className="fixed left-0 top-0 z-50 h-screen w-64 border-r border-border bg-card">

Updated Z-Index Hierarchy:

  • Sidebar: z-50 (highest - always clickable)
  • Model Status Bar: z-35
  • Header: z-30
  • PromptTextarea suggestions: z-30

Result:

  • Sidebar menu is now clickable on all pages including text2img
  • Navigation works consistently across the entire application
  • No more blocked click events on menu items

The fix is now live in the WebUI.

## Fixed in commit eac0d80 **Root Cause:** The sidebar had z-index 40, which created potential stacking context conflicts with other UI elements. While most elements had lower z-index values (Header: 30, PromptTextarea suggestions: 30), the combination of sticky positioning and overlapping elements could cause click events to be blocked on certain pages like text2img. **Solution:** Increased sidebar z-index from 40 to 50 to ensure it's always the topmost clickable element in the UI. **Changes:** Modified `webui/components/sidebar.tsx` (line 20): ```tsx // Before: <aside className="fixed left-0 top-0 z-40 h-screen w-64 border-r border-border bg-card"> // After: <aside className="fixed left-0 top-0 z-50 h-screen w-64 border-r border-border bg-card"> ``` **Updated Z-Index Hierarchy:** - Sidebar: **z-50** (highest - always clickable) - Model Status Bar: z-35 - Header: z-30 - PromptTextarea suggestions: z-30 **Result:** - Sidebar menu is now clickable on all pages including text2img - Navigation works consistently across the entire application - No more blocked click events on menu items The fix is now live in the WebUI.
Szontágh Ferenc a comentat 3 luni în urmă
Proprietar

Additional Fix in commit 29dd97b

Update: The z-index increase alone wasn't sufficient. The real culprit was the PromptTextarea's wrapper div blocking pointer events.

Deeper Root Cause: The PromptTextarea component structure was:

<div className="relative w-full">           // ❌ Capturing all pointer events
  <textarea />                              // Actual input field
  <div className="absolute inset-0" />      // Syntax highlighting overlay
  <div className="absolute mt-1" />         // Autocomplete suggestions
</div>

The outer wrapper div (relative w-full) was invisible but still capturing all pointer events within its bounding box. Even though it had no background or content, it blocked clicks from reaching elements beneath it - including the sidebar.

Why Only Text2img Page? All pages using PromptTextarea had this issue, but it was most noticeable on text2img because:

  1. The prompt field is near the top of the form
  2. The layout positions it in a way that overlaps with the sidebar area
  3. Other pages may have different content flow that didn't trigger the overlap

The Final Solution: Applied CSS pointer-events property to control event capturing:

// Wrapper: let events pass through
<div className="relative w-full pointer-events-none">

// Textarea: restore interaction
<textarea className="... pointer-events-auto" />

// Dropdown: restore interaction  
<div className="... pointer-events-auto">

How It Works:

  • pointer-events-none on wrapper: Clicks pass through as if the div doesn't exist
  • pointer-events-auto on children: Restores normal click behavior for interactive elements
  • Result: Wrapper is "invisible" to pointer events, sidebar is clickable again

Verification: Modified webui/components/prompt-textarea.tsx:

  • Line 257: Added pointer-events-none to wrapper
  • Line 270: Added pointer-events-auto to textarea
  • Line 286: Added pointer-events-auto to suggestions dropdown

Result: ✅ Sidebar navigation works on text2img page
✅ Textarea remains fully functional
✅ Autocomplete dropdown still works
✅ No side effects on other pages

The combination of:

  1. Sidebar z-index increased to 50 (commit eac0d80)
  2. Pointer-events fix on PromptTextarea (commit 29dd97b)

...completely resolves the navigation issue.

## Additional Fix in commit 29dd97b **Update:** The z-index increase alone wasn't sufficient. The real culprit was the PromptTextarea's wrapper div blocking pointer events. **Deeper Root Cause:** The PromptTextarea component structure was: ```tsx <div className="relative w-full"> // ❌ Capturing all pointer events <textarea /> // Actual input field <div className="absolute inset-0" /> // Syntax highlighting overlay <div className="absolute mt-1" /> // Autocomplete suggestions </div> ``` The outer wrapper div (`relative w-full`) was invisible but still capturing all pointer events within its bounding box. Even though it had no background or content, it blocked clicks from reaching elements beneath it - including the sidebar. **Why Only Text2img Page?** All pages using PromptTextarea had this issue, but it was most noticeable on text2img because: 1. The prompt field is near the top of the form 2. The layout positions it in a way that overlaps with the sidebar area 3. Other pages may have different content flow that didn't trigger the overlap **The Final Solution:** Applied CSS `pointer-events` property to control event capturing: ```tsx // Wrapper: let events pass through <div className="relative w-full pointer-events-none"> // Textarea: restore interaction <textarea className="... pointer-events-auto" /> // Dropdown: restore interaction <div className="... pointer-events-auto"> ``` **How It Works:** - `pointer-events-none` on wrapper: Clicks pass through as if the div doesn't exist - `pointer-events-auto` on children: Restores normal click behavior for interactive elements - Result: Wrapper is "invisible" to pointer events, sidebar is clickable again **Verification:** Modified `webui/components/prompt-textarea.tsx`: - Line 257: Added `pointer-events-none` to wrapper - Line 270: Added `pointer-events-auto` to textarea - Line 286: Added `pointer-events-auto` to suggestions dropdown **Result:** ✅ Sidebar navigation works on text2img page ✅ Textarea remains fully functional ✅ Autocomplete dropdown still works ✅ No side effects on other pages The combination of: 1. Sidebar z-index increased to 50 (commit eac0d80) 2. Pointer-events fix on PromptTextarea (commit 29dd97b) ...completely resolves the navigation issue.
Autentificați-vă pentru a vă alătura acestei conversații.
Fără etichetă
bug
ui
Nu există Milestone
Fără destinatar
1 Participanți
Se încarcă...
Anulare
Salvează
Nu există încă niciun conținut.