FolioReader / FolioReader-Android

A Java ePub reader and parser framework for Android.
BSD 3-Clause "New" or "Revised" License
2.24k stars 715 forks source link

Highlight redirection is not working if content lies in a table #390

Open AdarshYadav opened 4 years ago

AdarshYadav commented 4 years ago

Issue - Highlight redirection FolioReader version - 0.5.4 FolioReader Stock - Stock Android SDK - Android 9 api 28 Mobile - One Plus 6T Error - If highlighted text content belongs to any table then when user redirected to same content from Highlight screen, it is redirecting user to top of the chapter instead of that particular table location. Only Warning received in Logcat: "IndexSizeError: Failed to execute 'setEnd' on 'Range': The offset 240 is larger than the node's length (217). [file:///android_asset/js/Bridge.js:773]"

Steps to reproduce / Describe in detail -

  1. Open the app.
  2. Highlight any content in any table.
  3. Go to Hamburger icon->>> TAP on Highlights
  4. Tap on the highlighted text.

Actual Result: It is not redirecting to correct location of table highlighted text. Instead it is redirecting to first page of same chapter.