Closed nytamin closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 58.02%. Comparing base (
c862582
) to head (b6256cc
). Report is 8 commits behind head on release50.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
About the Contributor
This pull request is posted on behalf of the NRK
Type of Contribution
This is a: Bug fix
Current Behavior
We have reported issues in prod where the prompter "jump" in case of content changes (ie doesn't scroll to the new position correctly). We also see quite a few
Read anchor could not be found after update
errors in our logs.I haven't been able to properly reproduce the issue, but I believe it is related to the
getScrollAnchor
method returning an anchor which doesn't exist after the update.New Behavior
I've rewritten the
getScrollAnchor
algorithm to no return a list of anchors instead of a single one, order in falling "order of importance".When the content changes, if
restoreScrollAnchor
fails to find the first anchor, it can now continue and try the next ones after that.Testing Instructions
Status