Changeset e579a98 in Klonkt
- Timestamp:
- 06/21/2026 05:04:21 PM (3 months ago)
- Branches:
- main
- Children:
- 097da22
- Parents:
- 2520dcc
- File:
-
- 1 edited
-
src/views/partials/bottom-tab.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/bottom-tab.ejs
r2520dcc re579a98 321 321 322 322 <script> 323 // Wire the bottom-tab search button into the existing #search-overlay 323 // Bottom-tab zoekknop → opent #search-overlay. Via event-delegatie + de overlay 324 // ELKE klik opnieuw opzoeken: de overlay zit in de chrome die bij htmx-navigatie 325 // OOB vervangen wordt, dus een één-keer-opgevangen referentie verschaalt 326 // (knop deed daarna niets). Guard tegen dubbel-wiren. 324 327 (function() { 325 const btn = document.getElementById('bottom-tab-search-toggle'); 326 const overlay = document.getElementById('search-overlay'); 327 if (btn && overlay) { 328 btn.addEventListener('click', function() { 329 overlay.hidden = false; 330 const inp = overlay.querySelector('input'); 331 if (inp) inp.focus(); 332 }); 333 } 328 if (window.__btSearchWired) return; 329 window.__btSearchWired = true; 330 document.addEventListener('click', function(e) { 331 if (!e.target.closest || !e.target.closest('#bottom-tab-search-toggle')) return; 332 var o = document.getElementById('search-overlay'); 333 if (o) { o.hidden = false; var i = o.querySelector('input'); if (i) i.focus(); } 334 }); 334 335 })(); 335 336 </script>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)