fix(ext/popup): close 3 critical regressions from slice-2 code review
- C1: escapeHtml now escapes " and ' so values stored in data-field-value attributes (concealed rows, copyable rows) round-trip correctly. Prior impl silently truncated passwords containing quotes. +3 regression tests. - C2: centralize view-teardown. login.ts exports teardown() that stops the TOTP ticker and removes the active keydown handler; item-detail.ts and item-form.ts dispatchers call it before rendering the next view; each button handler also calls teardown() locally for belt-and-suspenders. - C3: restore alpha's keyboard shortcuts on login detail view: c (copy username), p (copy password), t (copy TOTP), f (autofill), e (edit), d (trash), plus Escape (back). All gated by the is-editable-target guard so they don't eat keystrokes inside form fields. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,11 @@ import { getState } from '../popup';
|
||||
import * as login from './types/login';
|
||||
|
||||
export async function renderItemDetail(app: HTMLElement): Promise<void> {
|
||||
// Tear down any tickers/handlers from a previous detail render before
|
||||
// the next one boots up. Each type module owns its own teardown; we
|
||||
// call all of them since the dispatcher doesn't know which was active.
|
||||
login.teardown();
|
||||
|
||||
const item = getState().selectedItem;
|
||||
if (!item) { navigate('list'); return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user