By the time the scroll area got scrolled to the start of the visible pages, the previous/next page wasn't yet shown and thus, the scrollable area wasn't updated yet.
Thus, in case the scrollable area grew in width due to the page change, the start never got scrolled into view due to triggering the logic too early.
Due to not including the states in the dependency array (to improve render performance), they do not include updated data and might cause an incorrect early exit.
E.g. in case a load error happened for a page whose loaded flag was already set to true, the pages load state never got updated again
- open from outside reader
- is read
- yes: 1st page
- no : last read page
- inside reader via
- chapter selection: first page
- previous chapter : last page
- next chapter : first page