diff --git a/changelog.md b/changelog.md index 1a09314..7746a5b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-04-12 - 3.8.2 - fix(sidebar) +restore search input focus after clearing the sidebar search + +- Updates the sidebar clearSearch behavior to focus the .search-input element after resetting the query and dispatching searchChanged. +- Improves search usability by letting users continue typing immediately after clearing the current search. + ## 2026-04-12 - 3.8.1 - fix(build) migrate smart config and update build tooling for latest tsbundle and TypeScript defaults diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 8fd06e0..e12184b 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@design.estate/dees-wcctools', - version: '3.8.1', + version: '3.8.2', description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.' } diff --git a/ts_web/elements/wcc-sidebar.ts b/ts_web/elements/wcc-sidebar.ts index c2e75d9..83b028b 100644 --- a/ts_web/elements/wcc-sidebar.ts +++ b/ts_web/elements/wcc-sidebar.ts @@ -867,6 +867,8 @@ export class WccSidebar extends DeesElement { private clearSearch() { this.searchQuery = ''; this.dispatchEvent(new CustomEvent('searchChanged', { detail: this.searchQuery })); + const input = this.shadowRoot.querySelector('.search-input') as HTMLInputElement; + if (input) input.focus(); } private handleMenuScroll(e: Event) {