Repository navigation
fix(snackbar): add type="button" - #17741
igdmdimitrov wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation correctly resolves the reported behavior and includes appropriate regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Prevents the snackbar action button from implicitly submitting a containing form.
Changes:
- Sets the default action button’s type to
button. - Adds unit coverage for the button type.
- Documents the fix in the changelog.
| File | Description |
|---|---|
snackbar.component.html |
Adds the explicit button type. |
snackbar.component.spec.ts |
Verifies the rendered type attribute. |
CHANGELOG.md |
Records the form-submission fix. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| All notable changes for each version of this project will be documented in this file. | ||
|
|
||
| ## 23.0.0 |
|
@igdmdimitrov With type="button" on the snackbar, the form no longer has a submit button. But the HTML spec still allows implicit submission when a form with no submit button has only one text-like input: pressing Enter in that input submits the form. The column actions search input is that one input, so Enter submits the form. Adding type="button" to individual buttons won't cover this. We need a more general fix that cancels the default action of Enter for inputs inside the grid. |
Closes #17638
Description
Add type="button" to snackbar component
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Snackbar
How Has This Been Tested?
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)