From daa7b0c58e359da18cb705162a57492da5e52248 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 08:47:48 -0700 Subject: The Back button under a post returns to the feed where the reader left it, not its top. It now walks history like the system Back (whose popstate restores the scroll place); the profile page's Back does the same. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog --- src/features/messages.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index b696267..73d4c03 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -7445,7 +7445,10 @@ export function messagesFeature(ctx) { // the public no-wallet surface drops the action row) ctx.brandHeader(!ui.pubProf && wallet.loaded), h('div', { class: 'card col thread-card', style: 'gap:0;padding:2px 14px' }, ...kids), - h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.noteThread = null; render(); } }, t('back')), + // a real Back: the history entry under the thread restores the feed + // (or profile) and its scroll place; ui-only only when the thread was + // opened straight from a link and there is nothing under it + h('button', { class: 'btn-ghost btn-block', onClick: () => ctx.goBack(() => { ui.noteThread = null; }) }, t('back')), ...noteOverlays()); } @@ -7911,7 +7914,7 @@ export function messagesFeature(ctx) { h('span', { class: 'spinner sm' })) : null); })(), - h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.profilePk = null; ui.profOverThread = false; ui.pubProf = null; ui.profEdit = null; ui.profEditFilled = false; ui.profCompose = null; render(); } }, t('back')), + h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.profCompose = null; ctx.goBack(() => { ui.profilePk = null; ui.profOverThread = false; ui.pubProf = null; ui.profEdit = null; ui.profEditFilled = false; }); } }, t('back')), mine ? logoutPop() : null, mine ? switchPop() : null, ...noteOverlays()); -- cgit v1.2.3