File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
src/bunit/EventDispatchExtensions Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -205,17 +205,9 @@ private static bool TryGetParentFormElementSpecialCase(
205205
206206 private static IHtmlFormElement ? FindFormById ( IElement element , string formId )
207207 {
208- // First try the owner's GetElementById (most efficient if it works)
209- var formByOwner = element . Owner ? . GetElementById ( formId ) as IHtmlFormElement ;
210- if ( formByOwner is not null )
211- {
212- return formByOwner ;
213- }
214-
215- // If GetElementById didn't work (which can happen when AngleSharp's document ID indexing
216- // doesn't include all elements), traverse up the DOM tree to find a common ancestor
217- // and search its children. This handles cases where the button and form are siblings
218- // or in different subtrees.
208+ // Traverse up the DOM tree to find a common ancestor and search its children
209+ // for the form with the matching ID. This handles cases where the button and
210+ // form are siblings or in different subtrees.
219211 var current = element . Parent as IElement ;
220212 while ( current is not null )
221213 {
You can’t perform that action at this time.
0 commit comments