Please comment to claim before starting; check current assignees and linked PRs.
Context
A grid with searchToolbar: {} inside a normal Neo.dialog.Base (modal: false) opens its Grid columns menu behind the dialog. The application can expose it by raising the created menu's zIndex, but ordinary nested use should not require an application-specific layer number.
Reproduced in headless Chrome at 94a7dd27e38224f08f4112880e0691f7693a9508, viewport1400×900, through the page's own Neural Link App Worker. No engine source patch was used.
The Problem
Use the existing examples/grid/issues grid's actual Store instance and app/window identities. In its App Worker, create a second grid in a non-modal dialog:
const {default: Dialog} = await import('/src/dialog/Base.mjs');
const {default: Grid} = await import('/src/grid/Container.mjs');
function openRepro(grid) {
return Neo.create(Dialog, {
appName: grid.appName,
windowId: grid.windowId,
modal: false,
resizable: false,
draggable: false,
title: 'Menu layering reproduction',
wrapperStyle: {left: '160px', top: '100px', width: '850px', height: '500px'},
containerConfig: {layout: 'fit'},
items: [{
module: Grid,
store: grid.store,
searchToolbar: {appName: grid.appName, windowId: grid.windowId},
columns: [
{dataField: 'id', text: 'ID', width: 100},
{dataField: 'title', text: 'Title', flex: 1, minWidth: 200},
{dataField: 'area', text: 'Area', width: 160}
]
}]
});
}Discover the existing grid with queryComponent({ntype:'grid-container'}), resolve that instance in the worker, and call openRepro(grid). The explicit toolbar metadata isolates stacking from a separately observed eager-toolbar construction failure; it is not the layer fix.
Click the new grid's Grid columns button normally. Read the mounted menu's computed style and hit-test a point inside both the menu rectangle and the dialog rectangle:
| Observation |
Default |
Change only menu.zIndex to1500 |
| Menu parent |
BODY |
BODY |
| Menu computed z-index |
100 |
1500 |
| Dialog computed z-index |
1000 |
1000 |
| Menu rectangle |
657.265625,190,351.734375,216 |
unchanged |
| Menu contains elementFromPoint(point) |
false: dialog grid header receives the hit |
true: menu icon receives the hit |
Both components are mounted; the menu's hidden flag alone is insufficient evidence. The positive control changes no layout, Store, search configuration or render parent.
The Architectural Reality
Design authority: Button#toggleMenu documents “Toggles the visibility of the button's menu, if one is configured.” An opened menu must remain visible and pointer-reachable over its owning dialog.
- Button.afterSetMenu supplies logical
parentComponent: button and merges the public menu object, without resolving an owner layer.
- Menu.List defaults
zIndex to100 and writes it inline. Submenus use their parent menu's z-index plus1.
parentId defaults to document.body; logical component ownership does not create a DOM stacking context. The floating contract deliberately keeps those concerns separate.
- Dialog defaults to floating; the floating CSS uses1000.
- SearchToolbar creates and retains its scope menu; it updates alignment/items/selection, with no dedicated scope-menu z-index pass-through.
The Fix
Nige's existing Picker/Dialog model is the precedent to reuse, not a new ancestor-z calculator.
- 16c9246, 2023-09-10 introduced the shared floating layer and the dialog SelectField example (now ComboBox).
- f43c92e, 2023-09-15 added nested modal dialogs and main-thread mask synchronization. Current DomAccess.syncModalMask moves one shared mask immediately before the active modal; fallback selects the last remaining
.neo-modal in DOM order or removes the mask.
- f992e52 adds main-thread mask-pointer prevention and per-dialog focus sentinels/TreeWalker wrapping. Picker Escape stops propagation. These are distinct from paint ordering and must be preserved.
- Picker containers and dialogs share
.neo-floating1000. A picker mounts on BODY after its dialog; the shared mask is before the active dialog. The menu's inline100 overrides this common layer.
A second browser control changed only the menu to1000: it followed the dialog in BODY before and after the change, retained the identical rectangle, and changed from failing to passing hit testing. A larger1500 value is unnecessary for this default case. The unchanged examples/dialog opening/picker/focus/Escape checks also passed at three nested modal levels, with one correctly positioned mask and all pickers at1000. This is not a whole-example pass: automatic mask cleanup after header-close failed on the base; the existing main-thread fallback repaired it when called manually, and that caller/lifecycle issue is recorded separately.
Reconcile the root menu's conflicting inline default with the established floating layer and DOM-order mechanism. Preserve explicit menu.zIndex and a coherent cascade without letting background menus defeat the foreground modal mask. Keep the existing body portal, main-thread mask authority, focus and alignment responsibilities. No new popup manager, folder or mandatory application config is prescribed.
Contract Ledger
| Surface |
Authority |
Required behavior |
Fallback/docs |
Evidence |
| Button.menu |
Button.afterSetMenu merge |
An unoverridden menu follows the default shared floating/modal model; explicit menu.zIndex remains effective |
Existing menu declaration; no mandatory caller change |
Default/1500 control above |
| Menu.List root/submenus |
zIndex setter and showSubMenu |
Root/cascade paint order remains coherent with the foreground modal mask |
Preserve menu interaction/focus/teardown |
Browser hit testing plus cascade control |
| Grid.searchToolbar |
Grid.beforeSetSearchToolbar / SearchToolbar scope Button |
Scope menu is reachable inside a dialog without post-construction z-index mutation |
Same search API and Store ownership |
Grid-in-dialog reproduction |
Acceptance Criteria
Out of Scope
Search/filter semantics; the eager SearchToolbar app/window metadata failure; the separately observed destroyed-dialog close/mask cleanup path; native browser popover/top-layer behavior; a general popup-manager redesign; automatic adaptation to arbitrary application stacking contexts; unrelated picker or calendar changes.
Avoided Traps
- Treating this as application misuse or choosing ever-higher numbers instead of reusing the existing floating/modality model.
- Reparenting the menu into a clipped grid/dialog solely to avoid layer resolution.
- Reusing the obsolete native-
<dialog> explanation from the later disposition of4504.
- Confusing this with
#19984/#19997, where clipping unmounted the menu, or #20448's visibility/mount-flight repair.
Decision Record impact: none — restore existing menu usability without a new architectural convention.
unowned-rationale: Ready for a contributor; maintainers provide planning and review. Public source, reproduction, positive control and verification criteria are supplied.
Related: #2589, #4504, #5499, #18701, #19794, #19804, #19984, #19997, #20448, #21061. The desktop demo is a future consumer; its app outcome and #21062's filtered-record defect are distinct.
Live latest-open + closed sweep: latest20 open (authors/labels/URLs) and closed search(menu dialog) re-read2026-11-16T00:00:53Z; same-surface scope/avoided-trap sections of19973/18850/17860/5621 and21061 read, plus4504's later disposition. No equivalent current owner or prior exclusion. Backlog:56 open(red);21061 is an app demonstration, not this engine layer defect.
A2A claim sweep:last30 all read-states,23:00–23:59Z; no overlapping stacking claim. Grace's21062 filtering work is a separate menu concern.
MC symptom sweep:dropdown hidden behind dialog; returned visibility/clipping history, not a current stacking repair. Own-assignment sweep:one unrelated open issue19058. Structure map:N/A—existing Engine UI owners, no Agent OS placement/new module.
Origin Session ID: 9622a4a2-09d7-490e-a4d7-97540bd1d001
Retrieval Hint: "grid search scope menu behind dialog body mounted zIndex100 floating1000"
Please comment to claim before starting; check current assignees and linked PRs.
Context
A grid with
searchToolbar: {}inside a normalNeo.dialog.Base(modal: false) opens its Grid columns menu behind the dialog. The application can expose it by raising the created menu'szIndex, but ordinary nested use should not require an application-specific layer number.Reproduced in headless Chrome at
94a7dd27e38224f08f4112880e0691f7693a9508, viewport1400×900, through the page's own Neural Link App Worker. No engine source patch was used.The Problem
Use the existing
examples/grid/issuesgrid's actual Store instance and app/window identities. In its App Worker, create a second grid in a non-modal dialog:const {default: Dialog} = await import('/src/dialog/Base.mjs'); const {default: Grid} = await import('/src/grid/Container.mjs'); function openRepro(grid) { return Neo.create(Dialog, { appName: grid.appName, windowId: grid.windowId, modal: false, resizable: false, draggable: false, title: 'Menu layering reproduction', wrapperStyle: {left: '160px', top: '100px', width: '850px', height: '500px'}, containerConfig: {layout: 'fit'}, items: [{ module: Grid, store: grid.store, searchToolbar: {appName: grid.appName, windowId: grid.windowId}, columns: [ {dataField: 'id', text: 'ID', width: 100}, {dataField: 'title', text: 'Title', flex: 1, minWidth: 200}, {dataField: 'area', text: 'Area', width: 160} ] }] }); }Discover the existing grid with
queryComponent({ntype:'grid-container'}), resolve that instance in the worker, and callopenRepro(grid). The explicit toolbar metadata isolates stacking from a separately observed eager-toolbar construction failure; it is not the layer fix.Click the new grid's Grid columns button normally. Read the mounted menu's computed style and hit-test a point inside both the menu rectangle and the dialog rectangle:
Both components are mounted; the menu's hidden flag alone is insufficient evidence. The positive control changes no layout, Store, search configuration or render parent.
The Architectural Reality
Design authority:
Button#toggleMenudocuments “Toggles the visibility of the button's menu, if one is configured.” An opened menu must remain visible and pointer-reachable over its owning dialog.parentComponent: buttonand merges the publicmenuobject, without resolving an owner layer.zIndexto100 and writes it inline. Submenus use their parent menu's z-index plus1.parentIddefaults todocument.body; logical component ownership does not create a DOM stacking context. The floating contract deliberately keeps those concerns separate.The Fix
Nige's existing Picker/Dialog model is the precedent to reuse, not a new ancestor-z calculator.
.neo-modalin DOM order or removes the mask..neo-floating1000. A picker mounts on BODY after its dialog; the shared mask is before the active dialog. The menu's inline100 overrides this common layer.A second browser control changed only the menu to1000: it followed the dialog in BODY before and after the change, retained the identical rectangle, and changed from failing to passing hit testing. A larger1500 value is unnecessary for this default case. The unchanged
examples/dialogopening/picker/focus/Escape checks also passed at three nested modal levels, with one correctly positioned mask and all pickers at1000. This is not a whole-example pass: automatic mask cleanup after header-close failed on the base; the existing main-thread fallback repaired it when called manually, and that caller/lifecycle issue is recorded separately.Reconcile the root menu's conflicting inline default with the established floating layer and DOM-order mechanism. Preserve explicit
menu.zIndexand a coherent cascade without letting background menus defeat the foreground modal mask. Keep the existing body portal, main-thread mask authority, focus and alignment responsibilities. No new popup manager, folder or mandatory application config is prescribed.Contract Ledger
Acceptance Criteria
menu: {zIndex: ...}remains effective through hide/reopen and submenu creation; no automatic policy for arbitrary custom stacking contexts is introduced.examples/dialogremains the nested-modal regression: ComboBox pickers stay above the active modal and its mask, Picker Escape does not close the dialog, and local focus wrapping works. Preserve outside-pointer dismissal and reopen/teardown behavior; classify the already-observed base close-mask cleanup failure separately.hidden:falseor menu bounds.Out of Scope
Search/filter semantics; the eager SearchToolbar app/window metadata failure; the separately observed destroyed-dialog close/mask cleanup path; native browser popover/top-layer behavior; a general popup-manager redesign; automatic adaptation to arbitrary application stacking contexts; unrelated picker or calendar changes.
Avoided Traps
<dialog>explanation from the later disposition of4504.#19984/#19997, where clipping unmounted the menu, or#20448's visibility/mount-flight repair.Decision Record impact: none — restore existing menu usability without a new architectural convention. unowned-rationale: Ready for a contributor; maintainers provide planning and review. Public source, reproduction, positive control and verification criteria are supplied.
Related: #2589, #4504, #5499, #18701, #19794, #19804, #19984, #19997, #20448, #21061. The desktop demo is a future consumer; its app outcome and
#21062's filtered-record defect are distinct. Live latest-open + closed sweep: latest20 open (authors/labels/URLs) and closed search(menu dialog) re-read2026-11-16T00:00:53Z; same-surface scope/avoided-trap sections of19973/18850/17860/5621 and21061 read, plus4504's later disposition. No equivalent current owner or prior exclusion. Backlog:56 open(red);21061 is an app demonstration, not this engine layer defect. A2A claim sweep:last30 all read-states,23:00–23:59Z; no overlapping stacking claim. Grace's21062 filtering work is a separate menu concern. MC symptom sweep:dropdown hidden behind dialog; returned visibility/clipping history, not a current stacking repair. Own-assignment sweep:one unrelated open issue19058. Structure map:N/A—existing Engine UI owners, no Agent OS placement/new module. Origin Session ID: 9622a4a2-09d7-490e-a4d7-97540bd1d001 Retrieval Hint: "grid search scope menu behind dialog body mounted zIndex100 floating1000"