InseeFr / Lunatic

Library of questionnaire components
https://inseefr.github.io/Lunatic/
MIT License
20 stars 21 forks source link

wrong value of lastReachedPage in loop #1019

Closed QRuhier closed 1 month ago

QRuhier commented 1 month ago

Describe the bug

When lastReachedPage (for example = lastPage) is after a loop , when coming back (only from before) on a page of the loop (except for 1rst iteration), the lastReachedPage is wrongly set at this page.

=> no problem if lastReachedPage is inside the loop

To Reproduce

Steps to reproduce the behavior:

  1. load questionnaire with
  2. go to page 10
  3. go back to page 9.1#2 => lastReachedPage is still 10
  4. go back to page 9.1#1 => lastReachedPage is still 10 👍
  5. go to 9.1#2 => lastReachedPage is updated to 9.1#2 👎 => same thing if you do : 10 -> 9.1#2 -> 9.1#3 => but no problem if you do : 10 -> 8 -> 9.1#1

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Version where the bug appeared

Appeared in 3.0.0 (still in 3.0.4)

Browser where the bug was tested

Additional context

Add any other context about the problem here.