Problem loading values from local storage in iBook widget

I have created an activity for an iBook that requires users to rate a writing sample based on four criteria. It is supposed to store the user’s ratings (numbers between 1-5) in local storage and reload them whenever the user navigates to that page again.

It works fine when I preview it in a browser. However, when I put the widget in an iBook, the stored values often don’t show up when the page loads. I know that the values are there, but for some reason they aren’t showing up on the screen. This happens at least half of the time I reload the widget. However, sometimes the values do appear as expected. I cannot figure out what is causing this strange behavior. I haven’t had this problem in other text-entry widgets that I have created with the same functionality.

Because there’s a lot going on in this widget, I’m thinking maybe something else on the page is creating the problem, but I can’t figure out what it would be. Has anyone else run into a similar issue?

E4F-EditModel.hype.zip (687.8 KB)

I can’t recall too many reports of localStorage issues with iBooks widgets, though this stack overflow answer does make it sound like support has been inconsistent.

When you reload, how are you doing it? Also is this in a preview context (like on the mac) or on the ipad?