daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
641 stars 241 forks source link

selection jumps position #658

Closed bksubhuti closed 2 years ago

bksubhuti commented 2 years ago

Steps to Reproduce

Code is checked in with this project. https://github.com/bksubhuti/Tipitaka-Pali-Projector (need to get the db from my drive listed on git page and then run script in database folder.) Open a book click on a word long press a word.

If there is a lot of text, the selection will jump out of view.

HTML expected to see the selected text in the same place without a forced scroll operation (which shows as a "jump" ```html ```
`HtmlWidget` configuration ```dart ```
Tesing environment ``` ```

Expected results

wanted to see selection in the same place.. no jumping

Actual results

it jumps.. but not always. depends on position of word selected.

daohoangson commented 2 years ago

Can you record the screen when it jumps?

bksubhuti commented 2 years ago

it seems that the beta was taken down and also the isSelectable feature. I have installed flutter_widget_from_html_core: ^0.8.3+1 and it is not finding this feature. Because of this I cannot give the "jumping selection" video

daohoangson commented 2 years ago

To avoid requiring Flutter 2.8 in the core package, this feature has been removed from flutter_widget_from_html_core. You will need to use flutter_widget_from_html for this.

Alternatively, you can keep using core with the pre-built mixin from https://pub.dev/packages/fwfh_selectable_text.

bksubhuti commented 2 years ago

does not build with the new pkg My other dev also confirmed .. can build on ios but not android. i'm only on android.

FAILURE: Build failed with an exception.

BUILD FAILED in 2m 6s

daohoangson commented 2 years ago

This package cannot affect Android linking, probably something else is causing that. Maybe do a flutter clean and try again?

bksubhuti commented 2 years ago

it still does not work.. with flutter clean and flutter build apk Is this tested on android? ios works on the other computer.

daohoangson commented 2 years ago

Yes, we do have GitHub workflows that compile an iOS / Android app for each commit.

https://github.com/daohoangson/flutter_widget_from_html/actions/workflows/demo_app.yml

bksubhuti commented 2 years ago

I don't know what to do. If I remove the pkg it works fine. If I add it, it does not build with the above mentioned errors. I'm building on linux. The other developer cannot build on mac. Perhaps it works on Windows only? Do I need both packages included. I'm using only the new one. I also tried both old and new packages included in yaml but only one actual import definition file.

Gradle has recently been updated earlier this week. Do I need to update again? I'm in myanmar so not all Android Studio/gradle updates are easy.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.0, on Ubuntu 21.10 5.13.0-22-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.61.1)
[✓] Connected device (2 available)

• No issues found!
daohoangson commented 2 years ago

Why don't you email me at daohoangson at gmail dot com. Maybe we can arrange a TeamViewer or something similar?

daohoangson commented 2 years ago

The bug has been resolved so I'm closing this issue.