╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │392 │ │393 const content = try generateHtml(allocator, &root); │ │394 defer allocator.free(content); │ │395 - const overlay = try generateOverlay(allocator, &root); │ │395 + const overlay = try generateOverlay(allocator, &root, &session); │ │396 defer allocator.free(overlay); │ │397 │ │398 // serialize the snapshot so the wasm side can parse it back without│ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │553 // emits the form overlay — one <form> per "form:<url>" focus subtree in the │ │554 // widget tree, each wrapping the text inputs and submit button inside it, │ │555 // positioned absolutely over the matching grid cells. │ │556 -pub fn generateOverlay(allocator: std.mem.Allocator, root: *ui.Widget) ![]const u8 { │ │556 +pub fn generateOverlay(allocator: std.mem.Allocator, root: *ui.Widget, session: *ui.Session) ![]const u8 {│ │557 const root_focus = root.getFocus(); │ │558 │ │559 var out: std.ArrayList(u8) = .empty; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │592 const r = root_child.rect; │ │593 switch (root_child.focus.kind) { │ │594 .text_input, .text_input_password => { │ │595 - const ti: *wgt.TextInput(ui.Widget) = @fieldParentPtr("focus", root_child.focus);│ │595 + const ti = session.text_inputs.get(inner_id) orelse continue; │ │596 const inner_left = r.x + 1; │ │597 const inner_top = r.y + 1; │ │598 const inner_width = if (r.size.width > 2) r.size.width - 2 else 0; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯