Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/topbar-search: fix safari click on result items

Signed-off-by: eti <eti@eti.tf>

eti (Jul 6, 2026, 12:17 PM +0200) 23303ac1 cfc49990

+9
+9
appview/pages/static/topbar-search.js
··· 137 137 if (container && !container.contains(target)) clearDesktop(); 138 138 }); 139 139 140 + // desktop: keep the input focused when a result is clicked. 141 + // Safari does not move focus to links/buttons on click, so mousedown would 142 + // blur the input, fire focusout with a null relatedTarget, and clear the 143 + // results before the click lands. Preventing the mousedown default keeps 144 + // focus on the input while the click still navigates via the href. 145 + document.addEventListener("mousedown", (e) => { 146 + if ($("topbar-search-results")?.contains(e.target)) e.preventDefault(); 147 + }); 148 + 140 149 // desktop: defer so a click on a result fires before results are cleared 141 150 document.addEventListener("focusout", ({ target, relatedTarget }) => { 142 151 const container = $("topbar-search-container");