Open mvariaaty opened 6 years ago
For Safari, I noticed that domRange.getBoundingClientRect()
in getDomRangeAsRange
function (https://github.com/readium/readium-shared-js/blob/master/js/views/scroll_view.js) gives incorrect results when range is collapsed. I see a note of the same effect in https://github.com/readium/readium-shared-js/blob/master/js/views/cfi_navigation_logic.js, which states that "Webkit has a bug where collapsed ranges provide an empty rect with getBoundingClientRect()". Applying the same logic in getDomRangeAsRange
, ie. using getClientRects
instead of getBoundingClientRect
, when range is collapsed, fixes point 2, in my testing.
There are few more usages of getBoundingClientRect
in the code. I wonder if they all would need similar treatment, if the above is correct ?
@JCCR do you have any thoughts on this? (asking because of "client rectangles" -related problems, CfiNavigationLogic etc.)
General Instructions
Scrolling in "Continuous" mode in Safari (Mac) does not work well in cloud reader (https://readium.firebaseapp.com). Note that it does work fine on Chrome (Version 62.0.3202.94 ) and Firefox (57.0.1).
This issue is a Bug
Expected Behaviour
Reading in "Continuous" scroll mode should work correctly in Safari
Observed behaviour
Scrolling in continuous mode seems buggy. To better explain the issues, I have created a video that exhibits the behavior - https://drive.google.com/file/d/1bFvUXWgMqYbEjpu7DmVO1tj6F6s2Hjh-/view?usp=sharing 1) Scrolling via touchpad sometimes lead to blank screen, which can then be scrolled up again. See video at 0:22 sec 2) Scrolling down displays the spinner, loads the content and takes the user back to the start of the page. This essentially does not allow to read next page. In the video, notice the browser scrolling back to start of Chapter 9 - 0:42 sec onwards 3) It seems that user needs to scroll up a little bit, before scrolling down is allowed
Steps to reproduce
Test file(s)
Video that exhibits the behavior - https://drive.google.com/file/d/1bFvUXWgMqYbEjpu7DmVO1tj6F6s2Hjh-/view?usp=sharing
Product
Choose one of the following (and delete the others)
Additional information
Scrolling in continuous mode works fine in other browsers that I have tested.