diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 12 | ||||
| -rw-r--r-- | src/features/messages.js | 9 |
2 files changed, 18 insertions, 3 deletions
@@ -3082,9 +3082,17 @@ function headerSearch() { onKeydown: (e) => { if (e.key === 'Enter' && !e.isComposing && e.target.value.trim()) { e.preventDefault(); featureHook('userSearchSubmit', e.target.value); e.target.blur(); } }, }); } +// Typing in the header field: whatever page is open steps aside for the +// results, but the search itself (its query and rows) stays. It used to do +// nothing once a search existed, so a profile opened from the results kept +// covering them while a new query was typed (Adam, 2026-11-14). function clearFeatureNavKeepSearch() { - if (ui.userSearch) return; // already on the search page: just the query moves - clearFeatureNav(); ui.screen = 'wallet'; + const s = ui.userSearch; + clearFeatureNav(); + // a visitor has no wallet screen to land on (it derived addresses from no + // seed: "Invalid mnemonic"); their search page draws over the front door + if (wallet.loaded) ui.screen = 'wallet'; + ui.userSearch = s; } function searchBtn() { diff --git a/src/features/messages.js b/src/features/messages.js index 2892153..b65b689 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -19218,7 +19218,14 @@ export function messagesFeature(ctx) { // the desktop header's search field: typing there IS the search page's query userSearchSubmit(q) { if (String(q || '').trim()) { openTextSearch(q); render(); } }, userSearchQuery(q) { - if (!ui.userSearch) { if (!isVisitor()) ui.chatOpen = false; ui.profilePk = null; ui.noteThread = null; ui.liveStream = null; ui.goLive = null; ui.userSearch = { q: '', rows: null }; warmSearch(); } + if (!ui.userSearch) { ui.userSearch = { q: '', rows: null }; warmSearch(); } + // Typing brings the results forward every time, not only the first: + // the search is kept (Back from a profile lands on it), so a second + // search typed from a profile opened from the first one updated a + // page hidden under that profile ("the search box stops working", + // Adam 2026-11-14). Back still returns to the profile. + if (!isVisitor()) ui.chatOpen = false; + ui.profilePk = null; ui.noteThread = null; ui.liveStream = null; ui.goLive = null; ui.userSearch.q = q; userSearcher.update(q); render(); return true; }, |
