Fix scratchbook window z-index stacking and improve styling#21738
Fix scratchbook window z-index stacking and improve styling#21738guerler merged 3 commits intogalaxyproject:devfrom
Conversation
Focus new WinBox windows on creation so they appear on top of existing windows instead of behind them. Update window styling to match Galaxy's UI -- use brand-primary for the title bar, add a box shadow for depth, apply the Galaxy font family (with higher specificity on .wb-title to override WinBox defaults), and set proper body background. Shadow and border are removed when maximized.
WinBox's constructor calls focus() (which auto-increments z-index) and then the index parameter overwrites it back to the passed value. Passing index:850 to every window meant they all ended up at z-index 850 regardless of creation order. Now we only pass index on the first window to establish the z-index floor above Galaxy UI, and let WinBox auto-manage from there.
WinBox's click-to-focus relies on mousedown events, which don't propagate out of iframes. Since scratchbook windows load content in iframes, clicking inside a window's content area couldn't bring it to front. Add a transparent overlay on each window that captures clicks when the window is unfocused, then use CSS pointer-events:none on the focused window's overlay so the iframe works normally.
|
Thanks for the screencast! There were actually two separate issues here:
|
guerler
left a comment
There was a problem hiding this comment.
Works very well! Thank you.
|
This PR was merged without a "kind/" label, please correct. |

Fix scratchbook window z-index stacking, iframe click-to-front, and improve styling.
indexto every WinBox.new() call — WinBox's constructor calls focus() which auto-increments z-index, but then the index parameter overwrites it. Pass it only on the first window to set a z-index floor above Galaxy UI.Addresses feedback from @nekrut
How to test the changes?
(Select all options that apply)
License