swift-toolkit icon indicating copy to clipboard operation
swift-toolkit copied to clipboard

TotalProgression for nearby selection is not different

Open rohitvishwakarma-sf opened this issue 2 years ago • 0 comments

Bug Report

What happened?

I want to sort highlights based on their reading order, so sorted them by locator's totalProgression but since totalProgression for nearby selection is same the sorting is not correct.

I added highlights by selecting text near to each other, since the totalProgession of the selection locator is same, I found it difficult to sort the highlights by totalProgression/reading order.

Expected behavior

TotalProgression of different selection locator should not be same.

How to reproduce?

Steps:

  1. Open EPUB
  2. Select text and add highlight
  3. select another text near to the first one without scrolling the page and add highlight

The total progression for both the highlights will output same, which shouldn't be.

Environment

Mac catalyst app It can be reproduced in any epub but I have attached one for reference.

  • Readium version: 2.4.0

Development environment

echo "macOS: sw_vers -productVersion" -> macOS: 13.1 echo "platform: uname -m" -> platform: arm64 xcodebuild -version -> Xcode 14.2, Build version 14C18

Testing device

  • iOS version: macCatalyst(macOS 13.1 , Ventura)

rohitvishwakarma-sf avatar Feb 01 '23 11:02 rohitvishwakarma-sf