A client reported to me an H5P activity (mod_h5pactivity) with a large number of fill-in-the-blanks questions, that failed to display. Most of the time, the user sees only an empty spot, or sometimes a flicker, where the H5P content should be. Occasionally it will successfully render after a short delay, but usually it does not.
On investigating, it looks like the problem is that h5p-resizer.js gets stuck in some kind of loop of resizing notifications. It receives a notification that the content has resized, so it triggers itself to resize its window. This then seems to trigger another notification that the content has resized, which restarts the loop. I suspect this is because the large number of fill-in-the-blank fields slows down its rendering, and this interferes with however it normally avoids triggering its own onresize handler.
I've replicated the behavior in FF and Chrome, and in Moodle 4.1 (the client's site version) as well as the latest Moodle 4.3.
I've attached a copy of the H5P module that triggers this behavior.
To replicate:
1. Open a course for editing
2. Add an h5p activity
3. Select this H5P module for the activity, and fill in other required fields
4. Click "Save and display"
Expected result: The content of the H5P module is displayed
Actual result: Usually, the H5P content is not displayed. If it is displayed, reloading the page may cause it to fail to display again.
- will be (partly) resolved by
-
MDL-75692 H5P content keeps flickering when resources is resizing after initial display
- Closed