Demonstrate issue where `SuperTextFieldInspector.findScrollOffset()` value is incorrect
As requested in a previous PR: https://github.com/superlistapp/super_editor/pull/2139#discussion_r1717331822
This PR demonstrates that the value of SuperTextFieldInspector.findScrollOffset() is incorrect sometimes after vertical scrolling on mobile.
I guess maybe this comment might contain a clue: https://github.com/superlistapp/super_editor/blob/main/super_editor/lib/src/super_textfield/infrastructure/text_scrollview.dart#L523-L537
cc/ @matthew-carroll
I see that you added a number of expectations. I assume they all fail? What values are each of them reporting?
@CillianMyles ping on the earlier review questions
@CillianMyles I ran into this issue while working on https://github.com/superlistapp/super_editor/issues/2316, but I'm not sure if it's the same issue you are facing.
It seems that sometimes the TextScrollController and the ScrollController can be out of sync. In my case, the ScrollController was being restored from page storage. I changed SuperTextFieldInspector.findScrollOffset() to read from the ScrollController instead of the TextScrollController and it fixed the test method. We still have the problem of the two controllers being out of sync though...
@angelosilvestre I assigned this to you so that you can dig further into the root cause after we decide what to do about restoring the scroll offset.