Repeat group with pages style not working well in Enketo after delete


In Enketo, a form in pages style with a repeat group is getting confused, if you delete a repeat, esp. the (only) last repeat:

  • Next and backward are temporarily not working
  • Page mode seems getting destroyed on navigation (Back, Return to Beginning, Next, Go to End)
  • etc.

It is the same in Online validator preview.
Things are working fine without page style, and in Collect (ODK).

Steps to Reproduce

Upload and preview this example and follow the steps form the screenshots below
Repeat01.xlsx (12.4 KB)

Expected behavior

The page style should stay stable, even after deleting. And navigation should not be blocked.
Navigation should be analog to behaviour without page style and as in Collect.

Actual behavior

  1. Enter two repeat cases:

  2. Now delete the second repeat case, you will get this screen:

  3. Push Next button (or Back): Bug - the first page will be included on top (Hello note).

  4. Click Next again: Now it gets ok (for a moment).

  5. Now delete this last repeat case: Bug - Neither Next nor Back are working. The UI is blocks, you can only use “Return to Beginning” or “Go to End” to escape. Also Clicking + and Next twice (!) will clean the situation.

  6. Go to End will show a multiple page screen (similar for Return to Beginning).

If you click + and move back again, things are re-established: A new first repeat is shown.

Additional details

Adding a group (with/without label) inside the repeat will not change the critical behaviour.

Tested with Firefox, KoboToolbox (Enketo), Online validator and Collect (ODK), all newest version.

@Kal_Lam: I added a new tag, page-style, please review and correct it to pages-style, please, or style-pages or what you like