╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1605 root_focus.setFocus(form.children.keys()[cur + 1]); │ │1606 }, │ │1607 .enter => if (cur == submit_field_index) try self.submitForm(allocator), │ │1609 - .mouse => |mouse| if (cur == submit_field_index and inp.leftClickOn(root_focus, cid, mouse)) {│ │1610 - try self.submitForm(allocator); │ │1608 + .mouse => |mouse| if (cur == submit_field_index) { │ │1609 + const submit = &form.children.values()[cur].widget.submit_button; │ │1610 + if (inp.leftClickOn(root_focus, submit.buttonId(), mouse)) try self.submitForm(allocator);│ │1611 }, │ │1612 else => try form.children.values()[cur].widget.input(allocator, key, root_focus), │ │1613 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1628 return child.widget.input(allocator, key, root_focus); │ │1629 } │ │1630 │ │1631 - const on_submit = isSubmitButton(&child.widget); │ │1631 + const on_submit = child.widget == .submit_button; │ │1632 │ │1633 switch (key) { │ │1634 .arrow_up, .back_tab => if (resolveStep(form, cur, false)) |i| self.focusResolveChild(form, i, root_focus) else self.focusHeader(root_focus),│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1646 else => try child.widget.input(allocator, key, root_focus), │ │1647 }, │ │1648 .enter => if (on_submit) try self.submitResolution(allocator), │ │1649 - .mouse => |mouse| if (on_submit and inp.leftClickOn(root_focus, cid, mouse)) { │ │1650 - try self.submitResolution(allocator); │ │1649 + .mouse => |mouse| if (on_submit) { │ │1650 + if (inp.leftClickOn(root_focus, child.widget.submit_button.buttonId(), mouse)) try self.submitResolution(allocator);│ │1651 }, │ │1652 else => try child.widget.input(allocator, key, root_focus), │ │1653 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │1663 }; │ │1664 } │ │1665 │ │1666 - // whether the widget is a button that posts its form │ │1667 - fn isSubmitButton(widget: *const ui.Widget) bool { │ │1668 - return switch (widget.*) { │ │1669 - .text_box => |*tb| switch (tb.box.focus.kind) { │ │1670 - .custom => |custom| std.mem.eql(u8, custom, "submit"), │ │1671 - else => false, │ │1672 - }, │ │1673 - else => false, │ │1674 - }; │ │1675 - } │ │1676 - │ │1666 // the neighboring focusable resolve-form child, skipping the spacer and │ │1667 // the blank gap rows │ │1668 fn resolveStep(form: *wgt.Box(ui.Widget), cur: usize, down: bool) ?usize {│ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1941 return inner.children.getIndex(cid) == tags_child_index and self.tagFlow(index) != null;│ │1942 } │ │1943 │ │1955 - // the open/close button inside the detail frame's tool row; a logged-out │ │1956 - // session's or conflicted issue's row has none. │ │1944 + // the open/close button inside the detail frame's tool row, identified │ │1945 + // by its posting kind; a logged-out session's or conflicted issue's row │ │1946 + // has none. │ │1947 fn statusButton(self: *View, index: usize) ?*wgt.TextBox(ui.Widget) { │ │1948 const row = self.toolRow(index); │ │1949 if (row.children.count() <= button_in_row_index) return null; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │1960 - const child = &row.children.values()[button_in_row_index].widget; │ │1961 - if (!isSubmitButton(child)) return null; │ │1962 - return &child.text_box; │ │1950 + switch (row.children.values()[button_in_row_index].widget) { │ │1951 + .text_box => |*tb| switch (tb.box.focus.kind) { │ │1952 + .custom => |custom| if (std.mem.eql(u8, custom, "submit")) return tb,│ │1953 + else => {}, │ │1954 + }, │ │1955 + else => {}, │ │1956 + } │ │1957 + return null; │ │1958 } │ │1959 │ │1960 fn toolRowFocused(self: *View, index: usize) bool { │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯