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 875 forks source link

[BUG] The custom table automatically bounces back to the starting position when scrolling in customRender . #1090

Closed fangxuan0 closed 2 years ago

fangxuan0 commented 2 years ago

Describe the bug:

My table is too wide for the screen, I customize it using customerRender, then the page can scroll, but when the scroll is over, the content will automatically bounce back to the beginning of the table.

HTML to reproduce the issue:

Topped with a lace choker, detailed with symmetrical semi-lined holes all around. Unique design that beats the simplicity of your usual go to design. Satisfy your deep cravings with this single one-piece.


• High heck
• Fishnet fabric
• Soft and stretchy
• Dress silhouette
• Intricate design
• Sheer
• Slimming fit
• Thong included
• Imported

• Height: 5'-5'10"
• Weight: 90-175 lbs

Composition: 92% Nylon 8% Spandex

Care: Hand wash warm, Only use non-chlorine bleach when needed, Drip dry, do not iron.

Html widget configuration:

customRender: { "table": (context, child) { return SingleChildScrollView( scrollDirection: Axis.horizontal, child: (context.tree as TableLayoutElement).toWidget(context), ); }, }

Expected behavior:

I can scroll back to show you what's on the far right.

Screenshots:

IMG_51512ECEB0B9-1

Device details and Flutter/Dart/flutter_html versions:

Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7e9793dee1 (4 months ago) • 2022-03-02 11:23:12 -0600 Engine • revision bd539267b4 Tools • Dart 2.16.1 • DevTools 2.9.2

flutter_html: ^2.2.1

Stacktrace/Logcat

A picture of a cute animal (not mandatory but encouraged)

log