diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 01bea1f0e5..e71b8723a2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,6 +17,7 @@ Changelog * Keep applied filters when downloading form submissions (Suyash Srivastava) * Messages added dynamically via JavaScript now have an icon to be consistent with those supplied in the page's HTML (Aman Pandey) * Switch lock/unlock side panel toggle to a switch, with more appropriate confirmation message status (Sage Abdullah) + * Ensure that changed or cleared selection from choosers will dispatch a DOM `change` event (George Sakkis) * Fix: Ensure `label_format` on StructBlock gracefully handles missing variables (Aadi jindal) * Fix: Adopt a no-JavaScript and more accessible solution for the 'Reset to default' switch to Gravatar when editing user profile (Loveth Omokaro) * Fix: Ensure `Site.get_site_root_paths` works on cache backends that do not preserve Python objects (Jaap Roes) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index ebbca0358c..e8101ade17 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -700,6 +700,7 @@ Contributors * Sam * Deepam Priyadarshi * Mng +* George Sakkis Translators =========== diff --git a/client/src/components/ChooserWidget/index.js b/client/src/components/ChooserWidget/index.js index b8fe5aaa81..5e19e9b936 100644 --- a/client/src/components/ChooserWidget/index.js +++ b/client/src/components/ChooserWidget/index.js @@ -85,11 +85,13 @@ export class Chooser { renderEmptyState() { this.input.setAttribute('value', ''); + this.input.dispatchEvent(new Event('change', { bubbles: true })); this.chooserElement.classList.add('blank'); } renderState(newState) { this.input.setAttribute('value', newState.id); + this.input.dispatchEvent(new Event('change', { bubbles: true })); if (this.titleElement && this.titleStateKey) { this.titleElement.textContent = newState[this.titleStateKey]; } diff --git a/docs/releases/5.0.md b/docs/releases/5.0.md index 6b21d5d68b..58b480f8ed 100644 --- a/docs/releases/5.0.md +++ b/docs/releases/5.0.md @@ -29,6 +29,7 @@ Support for adding custom validation logic to StreamField blocks has been formal * Keep applied filters when downloading form submissions (Suyash Srivastava) * Messages added dynamically via JavaScript now have an icon to be consistent with those supplied in the page's HTML (Aman Pandey) * Switch lock/unlock side panel toggle to a switch, with more appropriate confirmation message status (Sage Abdullah) + * Ensure that changed or cleared selection from choosers will dispatch a DOM `change` event (George Sakkis) ### Bug fixes