Skip to content

Commit f787704

Browse files
committed
fix: show body-level popups over the fullscreen overlay (2.4.1)
Smart Phrasing / Load Image / Shrink popups attach to document.body at z-index 10000, but the fullscreen overlay is z-index 99990, so they rendered behind it and were invisible until you exited fullscreen. Parent these modals into the fullscreen overlay when it's active (it owns the stacking context, so a fixed backdrop inside it still covers the viewport and renders above the editor); unchanged outside fullscreen.
1 parent 023f892 commit f787704

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "comfyui-angelo"
3-
version = "2.4.0"
3+
version = "2.4.1"
44
description = "Click-to-edit sampler for ComfyUI. Generate an image, then work it like a photo editor — click or paint to refine, drag or describe to inpaint, click an edge to outpaint, paint over something to remove it and rebuild the background, and one-click restore or upscale a whole photo. First-class support for FLUX 2 Klein 9B and Qwen-Image-Edit, plus any sampler-compatible model. Includes a Remove brush, Fullscreen editing mode, Quick Photo Refine, 2× Pixel + Shrink resizing, Outpaint, Reference anchoring, Xtra-Fine, Smart Inpaint, Fix All, Vary ×4, optional SAM 3 Detect, and a companion Overrides node for custom samplers."
55
license = { text = "MIT" }
66
readme = "README.md"

web/angelo.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,6 +2671,16 @@ function syncPromptSlotButtons(node) {
26712671
});
26722672
}
26732673

2674+
// Body-level modal popups (Smart Phrasing / Load Image / Shrink) normally
2675+
// attach to document.body so they overlay the whole page. But while the node is
2676+
// in fullscreen, the fullscreen overlay sits ABOVE document.body's popups, so
2677+
// they'd be hidden until you exit. Parent them into the overlay instead when
2678+
// it's active — the overlay owns the stacking context, so a fixed backdrop
2679+
// inside it still covers the viewport and renders above the editor.
2680+
function _angeloModalParent(node) {
2681+
return (node && node._AngeloFSOverlay) ? node._AngeloFSOverlay : document.body;
2682+
}
2683+
26742684
function showSmartPhrasingPopup(node) {
26752685
const backdrop = document.createElement("div");
26762686
backdrop.style.cssText = "position:fixed; inset:0; background:rgba(0,0,0,0.6); "
@@ -2724,7 +2734,7 @@ function showSmartPhrasingPopup(node) {
27242734
footer.appendChild(insertBtn);
27252735
modal.appendChild(footer);
27262736
backdrop.appendChild(modal);
2727-
document.body.appendChild(backdrop);
2737+
_angeloModalParent(node).appendChild(backdrop);
27282738

27292739
const close = () => { if (backdrop.parentNode) backdrop.parentNode.removeChild(backdrop); };
27302740
insertBtn.addEventListener("click", () => {
@@ -3898,7 +3908,7 @@ function showLoadImagePopup(node, file) {
38983908
modal.appendChild(footer);
38993909

39003910
backdrop.appendChild(modal);
3901-
document.body.appendChild(backdrop);
3911+
_angeloModalParent(node).appendChild(backdrop);
39023912

39033913
const close = () => { if (backdrop.parentNode) backdrop.parentNode.removeChild(backdrop); };
39043914
cancelBtn.addEventListener("click", close);
@@ -4282,7 +4292,7 @@ function showShrinkPopup(node) {
42824292
modal.appendChild(footer);
42834293

42844294
backdrop.appendChild(modal);
4285-
document.body.appendChild(backdrop);
4295+
_angeloModalParent(node).appendChild(backdrop);
42864296

42874297
const close = () => { if (backdrop.parentNode) backdrop.parentNode.removeChild(backdrop); };
42884298
cancelBtn.addEventListener("click", close);

0 commit comments

Comments
 (0)