╭ changed ────────────╮ │src/ui/Auth/Login.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │39 const button_index: usize = 2; │ │40 │ │41 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session, success_redirect_tab_id: usize) !View { │ │42 - var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │42 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .vert });│ │43 errdefer box.deinit(allocator); │ │44 // marks this subtree as an HTML form scope for the web overlay │ │45 box.getFocus().kind = .{ .custom = switch (session.data.current_page) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │50 var nav_ids: [3]usize = undefined; │ │51 │ │52 { │ │53 - var username = wgt.TextInput(ui.Widget).init(.{ .label = " username ", .name = "username", .rounded_corners = true, .render_content = !wasm }); │ │53 + var username = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " username ", .name = "username", .rounded_corners = true, .render_content = !wasm });│ │54 errdefer username.deinit(allocator); │ │55 username.getFocus().focusable = true; │ │56 nav_ids[username_index] = username.getFocus().id; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 } │ │63 │ │64 { │ │65 - var password = wgt.TextInput(ui.Widget).init(.{ .label = " password ", .password = true, .name = "password", .rounded_corners = true, .render_content = !wasm }); │ │65 + var password = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " password ", .password = true, .name = "password", .rounded_corners = true, .render_content = !wasm });│ │66 errdefer password.deinit(allocator); │ │67 password.getFocus().focusable = true; │ │68 nav_ids[password_index] = password.getFocus().id; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │120 else │ │121 " password "; │ │122 │ │123 + // refresh our entries in the session's focus-id -> *TextInput map with │ │124 + // this frame's current input addresses, so the web/wasm form handling │ │125 + // can find them by focus id │ │126 + const inputs_arena = self.session.arena.allocator(); │ │127 + try self.session.text_inputs.put(inputs_arena, username_input.getFocus().id, username_input);│ │128 + try self.session.text_inputs.put(inputs_arena, password_input.getFocus().id, password_input);│ │129 + │ │130 try self.center.build(allocator, constraint, root_focus); │ │131 } │ │132 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯