Skip to content

Conversation

@egil
Copy link
Member

@egil egil commented Oct 31, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 31, 2025 15:24
@egil
Copy link
Member Author

egil commented Oct 31, 2025

@copilot please complete the implementation of #1766 in this feature branch, making the test that is added to this branch pass.

Copy link
Contributor

Copilot AI commented Oct 31, 2025

@egil I've opened a new pull request, #1771, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds test coverage for form submission behavior when a submit button is located outside the form element but associated via the HTML5 form attribute. The changes clean up whitespace inconsistencies and add a new test case to verify this specific scenario.

  • Normalized line endings and removed trailing whitespace in existing test methods
  • Added a new test ClickingOnSubmitButtonOutsideTriggersOnsubmitOfForm to verify submit buttons outside forms work correctly
  • Created a new test component FormWithButtonOutside.razor to support the new test case

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/bunit.tests/EventDispatchExtensions/FormDispatchExtensionTest.cs Added new test case for external submit button and cleaned up whitespace
tests/bunit.testassets/SampleComponents/FormWithButtonOutside.razor New test component with a form and an external submit button linked via form attribute

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ing form attribute (#1771)

* Initial plan

* Initial investigation of form submit issue

Co-authored-by: egil <105649+egil@users.noreply.github.com>

* Implement support for clicking submit button outside form with form attribute

Co-authored-by: egil <105649+egil@users.noreply.github.com>

* Improve comments in FindFormById method

Co-authored-by: egil <105649+egil@users.noreply.github.com>

* Restore net10.0 target framework to all projects

Co-authored-by: linkdotnet <26365461+linkdotnet@users.noreply.github.com>

* Fix misleading comment about incremental DOM rendering

Co-authored-by: egil <105649+egil@users.noreply.github.com>

* Add test cases for input element with form attribute outside form

Co-authored-by: egil <105649+egil@users.noreply.github.com>

* Simplify FindFormById by removing GetElementById attempt

Co-authored-by: egil <105649+egil@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: egil <105649+egil@users.noreply.github.com>
Co-authored-by: linkdotnet <26365461+linkdotnet@users.noreply.github.com>
@egil
Copy link
Member Author

egil commented Nov 2, 2025

@copilot update the changelog.md accordingly

Copy link
Contributor

Copilot AI commented Nov 2, 2025

@egil I've opened a new pull request, #1772, to work on those changes. Once the pull request is ready, I'll request review from you.

@egil egil enabled auto-merge (squash) November 2, 2025 09:03
@egil egil disabled auto-merge November 2, 2025 09:04
@egil egil enabled auto-merge (rebase) November 2, 2025 09:04
@egil egil merged commit 89c4ea3 into main Nov 2, 2025
7 checks passed
@egil egil deleted the fix/1766-button-outside-form-submit branch November 2, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants