diff --git a/changelog.md b/changelog.md index 2bead95..78b3a2b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-09-07 - 1.11.2 - fix(DeesFormSubmit) +Make form submit robust by locating nearest dees-form via closest(); add local CLAUDE settings + +- Fix: DeesFormSubmit.submit now walks up the DOM with closest('dees-form') to find and call gatherAndDispatch on the parent form. This fixes cases where the submit button is slotted or not a direct child of the form. +- Chore: Add .claude/settings.local.json to permit running pnpm scripts in the local CLAUDE environment (allows Bash(pnpm run:*)). + ## 2025-09-06 - 1.11.1 - fix(dees-input-text) Normalize Lucide icon names for password toggle diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 56f78dd..7f5dbf6 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-catalog', - version: '1.11.1', + version: '1.11.2', description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.' } diff --git a/ts_web/elements/dees-form-submit.ts b/ts_web/elements/dees-form-submit.ts index 0434f15..7bc0678 100644 --- a/ts_web/elements/dees-form-submit.ts +++ b/ts_web/elements/dees-form-submit.ts @@ -57,9 +57,10 @@ export class DeesFormSubmit extends DeesElement { if (this.disabled) { return; } - const parentElement: DeesForm = this.parentElement as DeesForm; - if (parentElement && parentElement.gatherAndDispatch) { - parentElement.gatherAndDispatch(); + // Walk up the DOM tree to find the nearest dees-form element + const parentFormElement = this.closest('dees-form') as DeesForm; + if (parentFormElement && parentFormElement.gatherAndDispatch) { + parentFormElement.gatherAndDispatch(); } }