[object Object]

← back to Dw Collections Viewer

press C anywhere to focus collection search input

8a47889f6eabd079335f29fa88fda035f1f4fb0a · 2026-05-06 12:29:47 -0700 · SteveStudio2

Files touched

Diff

commit 8a47889f6eabd079335f29fa88fda035f1f4fb0a
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Wed May 6 12:29:47 2026 -0700

    press C anywhere to focus collection search input
---
 public/index.html | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/public/index.html b/public/index.html
index 612dfd6..5794923 100644
--- a/public/index.html
+++ b/public/index.html
@@ -573,7 +573,7 @@ function renderDetail() {
 
     <div class="section">
       <h3>Add a Shopify Collection</h3>
-      <input class="coll-search" type="text" placeholder="search ${COLLS.length} DW collections…" oninput="filterColls(this.value)" value="${esc(COLL_FILTER)}">
+      <input class="coll-search" type="text" placeholder="search ${COLLS.length} DW collections… (press C)" oninput="filterColls(this.value)" value="${esc(COLL_FILTER)}">
       <div class="coll-list">${collList}</div>
     </div>
 
@@ -781,6 +781,20 @@ document.addEventListener('drop', async (e) => {
   await uploadCoverFile(t.slug, file);
 });
 
+// Press "C" anywhere outside an input → focus the collection search.
+document.addEventListener('keydown', (e) => {
+  if (e.key !== 'c' && e.key !== 'C') return;
+  if (e.metaKey || e.ctrlKey || e.altKey) return;
+  const t = e.target;
+  const tag = (t && t.tagName || '').toLowerCase();
+  if (tag === 'input' || tag === 'textarea' || (t && t.isContentEditable)) return;
+  const search = document.querySelector('.coll-search');
+  if (!search) return;
+  e.preventDefault();
+  search.focus();
+  search.select();
+});
+
 async function clearCover(e) {
   if (e) { e.stopPropagation(); e.preventDefault(); }
   if (!CURRENT) return;

← 7455efd show SKU + published_at in product card hover tooltip  ·  back to Dw Collections Viewer  ·  bulk product remove-from-list (server endpoint + UI button) 3f6faec →