╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2807 .mouse => |mouse| if (self.resultsBox(index).children.values()[detail_index].rect == null and widget.clickOnSelectedRow(self.listBox(index), root_focus, mouse)) {│ │2808 try self.refreshDetail(allocator, index); │ │2763 - _ = self.detail(index).focusFirst(root_focus); │ │2809 + self.focusDetail(index, root_focus); │ │2810 }, │ │2811 else => {}, │ │2812 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │3317 const id_hex = std.fmt.bytesToHex(id, .lower); │ │3318 const route = ui.RoutablePage.repoEventsRoute(self.data.identity, .removed, event_kind, &id_hex, null) orelse return;│ │3319 try self.session.navigate(route); │ │3320 + } │ │3321 + │ │3322 + // enter the detail pane, landing on the way back to the list when it │ │3323 + // has one. selecting the frame's child (then focusing the frame) also │ │3324 + // handles the too-narrow case where the pane isn't laid out yet. │ │3325 + fn focusDetail(self: *This, index: usize, root_focus: *Focus) void { │ │3326 + if (self.backId(index) == null) { │ │3327 + _ = self.detail(index).focusFirst(root_focus); │ │3328 + return; │ │3329 + } │ │3330 + const frame = self.detailFrame(index); │ │3331 + frame.getFocus().child_id = frame.children.keys()[detail_back_index]; │ │3332 + root_focus.setFocus(frame.getFocus().id); │ │3333 } │ │3334 │ │3335 // return to the list. │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯