cc1e4864ce62
close popup after passkey approve/deny; fix TOTP double-click clobbering clipboard (v2.38.17)
- time
- 2026-05-12 17:19 UTC · 5 months ago
- machine
- koh2
- parent
- f110a866ba42
↓ peach-browser-cc1e4864.tar.gzatlas at this save
files changed4 files
manifest.firefox.json+1 −1manifest.json+1 −1src/popup/App.tsx+3 −2src/popup/views/Entry.tsx+15 −2manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22 "manifest_version": 3,33 "name": "Peach",4- "version": "2.38.16",4+ "version": "2.38.17",55 "description": "Zero-knowledge password manager",66 "browser_specific_settings": {77 "gecko": {manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22 "manifest_version": 3,33 "name": "Peach",4- "version": "2.38.16",4+ "version": "2.38.17",55 "description": "Zero-knowledge password manager",66 "action": {77 "default_popup": "src/popup/index.html",src/popup/App.tsx+3 −2
@@ -1106,17 +1106,18 @@11061106 await sendMessage({ type: "DENY_PASSKEY", payload: { requestId: pending.requestId } });11071107 setPendingPasskey(null);11081108 void loadEntries();1109+ window.close();11091110 return;11101111 }11111112 await sendMessage({ type: "APPROVE_PASSKEY", payload: { requestId: pending.requestId } });1112- setPendingPasskey(null);1113+ window.close();11131114 }11141115 11151116 async function handleDenyPendingPasskey() {11161117 const pending = pendingPasskey();11171118 if (!pending) return;11181119 await sendMessage({ type: "DENY_PASSKEY", payload: { requestId: pending.requestId } });1119- setPendingPasskey(null);1120+ window.close();11201121 }11211122 11221123 function queueContentIdle(after?: () => void) {src/popup/views/Entry.tsx+15 −2
@@ -49,6 +49,8 @@4949 // Auto-open advanced when entry already has passkey or canary configured5050 const [showAdvanced, setShowAdvanced] = createSignal(false);5151 let lastSavedNote: string | null = null;52+ let totpClickTimer: ReturnType<typeof setTimeout> | null = null;53+ onCleanup(() => { if (totpClickTimer) clearTimeout(totpClickTimer); });5254 5355 function noteExec(cmd: string, val?: string) {5456 document.execCommand(cmd, false, val);@@ -1209,8 +1211,19 @@12091211 <>12101212 <div12111213 class="peach-totp-main"1212- onClick={() => void copyField(state().code.replace(" ", ""), "totp")}1213- onDblClick={() => startEdit("totp", entry().totp ?? "")}1214+ onClick={() => {1215+ // Delay copy so a double-click can cancel it before1216+ // it overwrites the clipboard the user wants to paste from.1217+ if (totpClickTimer) return;1218+ totpClickTimer = setTimeout(() => {1219+ totpClickTimer = null;1220+ void copyField(state().code.replace(" ", ""), "totp");1221+ }, 220);1222+ }}1223+ onDblClick={() => {1224+ if (totpClickTimer) { clearTimeout(totpClickTimer); totpClickTimer = null; }1225+ startEdit("totp", entry().totp ?? "");1226+ }}12141227 title="Click to copy · double-click to edit"12151228 >12161229 <span class="peach-label">2-factor</span>