Skip to content

[BUG] SelectableHtml not displaying <ul> or <li> #1162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eMxPi opened this issue Oct 10, 2022 · 5 comments
Closed

[BUG] SelectableHtml not displaying <ul> or <li> #1162

eMxPi opened this issue Oct 10, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@eMxPi
Copy link

eMxPi commented Oct 10, 2022

Describe the bug:
When Using SelectableHTML on Flutter 3.0.5, html text with <ul> or </li> are skipped.

Capture d’écran 2022-10-10 à 14 20 05

Steps to Reproduce
Create a widget based on SelectableHtml and ask it to display html data containing <ul> and </li>

Actual results:
Text being displayed when using Html widget
Capture d’écran 2022-10-10 à 14 12 35
But not displayed with SelectableHtml
Capture d’écran 2022-10-10 à 14 20 05

Code Sample :
Semantics( label: 'My test', container: true, excludeSemantics: true, child: SelectableHtml( key: Key('myKey'), data: '<div>this is a sample text: <ul><li>first entry</li><li>first entry</li></ul></div>', ), ),

HTML to reproduce the issue:

this is a sample text:
  • first entry
  • first entry

Html widget configuration:
Semantics( label: 'My test', container: true, excludeSemantics: true, child: SelectableHtml( key: Key('myKey'), data: '<div>this is a sample text: <ul><li>first entry</li><li>first entry</li></ul></div>', ), ),

Expected behavior:
Capture d’écran 2022-10-10 à 14 12 35

Screenshots:

Device details and Flutter/Dart/flutter_html versions:
flutter 3.0.5 and flutter_html 3.0.0-alpha3

@eMxPi eMxPi added the bug Something isn't working label Oct 10, 2022
@sawirricardo
Copy link

Any workaround for this? @Sub6Resources

@sawirricardo
Copy link

sawirricardo commented Oct 17, 2022

It also doesnt show any img tag or figure tag, related?

@eMxPi
Copy link
Author

eMxPi commented Oct 17, 2022

My fix => Use SelectedArea with Flutter 3.3 and keep HTML()

@sawirricardo
Copy link

My fix => Use SelectedArea with Flutter 3.3 and keep HTML()

SelectionArea you mean?

@Sub6Resources
Copy link
Owner

Sub6Resources commented Oct 19, 2022

@sawirricardo, @eMxPi has the correct and preferred solution. SelectableHtml will be deprecated in the near future in favor of the SelectionArea widget from Flutter 3.3.

See #1153 for more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants