Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.8k stars 874 forks source link

[BUG] detail/summary not rendered correctly in latest version with HtmlExtension #1275

Closed arjanmels closed 1 year ago

arjanmels commented 1 year ago

Describe the bug: After transition to HtmlExtension the details/summary tags sometimes show "Details" instead of the summary provided in the summary tag. Debugged in the code: due to context.builtChildrenMap in DetailsElementBuiltIn build function containing "[text]" element as first child instead of summary.

HTML to reproduce the issue:

<!DOCTYPE html>
<html>
<body>
<details>
  <summary><h1>Header</h1></summary>
  <p>These are the details.</p>
</details>
</body>
</html>

Html widget configuration: Not relevant

Expected behavior: Should show the "Header" text instead of "Details"

Device details and Flutter/Dart/flutter_html versions: Flutter 3.10.1 / Dart 3.0.1

arjanmels commented 1 year ago

I'm guessing commit https://github.com/Sub6Resources/flutter_html/commit/cc00406b1d0c115e5c66dd4bdfb40db32496f55f does not work completely as expected.

arjanmels commented 1 year ago

Fixed by #1276

Sub6Resources commented 1 year ago

Thanks for the contribution! Just made a comment on your pull request.