Popup state persists when closed and immediately reopened
Why it matters
Chrome tears down the popup JavaScript context the moment the popup loses focus, so every piece of in-memory state — active tab, scroll position, half-typed search queries, expanded accordions — vanishes on close. Users who click out to copy a value from another tab return to a reset UI and lose their input. For extensions with multi-step forms or tabbed settings, this destroys the mental flow and trains users to avoid the popup entirely, driving them to the options page or uninstalling.
Severity rationale
Low because lost state is an annoyance rather than a failure of core functionality or data integrity.
Remediation
Persist transient UI state to chrome.storage.session before the popup unloads and restore it on the next open. Session storage clears when the browser closes, which matches user expectations for ephemeral UI state. Wire this up in popup.js:
window.addEventListener('unload', () => {
chrome.storage.session.set({ activeTab, searchQuery: input.value });
});
chrome.storage.session.get(['activeTab', 'searchQuery'], restore);
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Extension UX & Performance Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from extension-ux-performance·automated