Display error - Interactive Book

diegoarielvega's picture

Hello: 

I wanted to report an display error with the content type Interactive Book (version 1.11.8)

The error occurs in Moodle 4.5.4 on desktop version with the following browsers: Brave, Edge, Chrome, Firefox, Safari, Chromium (in their latest versions). 

The problem is when marking 'Show Table of Contents' as Default Setting: When enabled, the table of contents is displayed when you open the workbook. This causes any image included as part of the content to appear flickering (a GIF is attached for better visualization).

Thank you very much in advance.

Best regards

 

Content types: 
BV52's picture

Hi diegoarielvega,

How are you inserting your content? I tried using plugin or embed but I was unable to reproduce the issue. I also tried it in H5P.com and it was behaving as expected.

-BV

diegoarielvega's picture

Hi BV, and thanks for your answer.

When importing the contents of an .h5p file exported from another Moodle, I encounter this problem.I thought it might be due to some versioning issue with the installed content.

However, when creating new content, it also happens.

BV52's picture

Hi diegoarielvega,

Unfortunately, I am still unable to reproduce this issue.

-BV

otacke's picture

Just guessing: Looks like an infinite resize loop.

Subcontent needs to grow a little in height, causing the container to overflow and add a scrollbar. The scrollbar takes away a little of the width, and thus of the height of the subcontent. So the subcontent shrinks a little in height. The scrollbar disappears, ergo there's a little space to grow for the subcontent. And we go again.

This will, of course, only be reproducible at a certain content height / viewport width. In order to reproduce, one should resize the viewport (window) in width so that the cycle could disappear.

On top, this could be influenced by the specific H5P integration. For instance, moodle's own H5P integration puts H5P's iframe in yet another iframe with its own resize mechanism. So, you have two different resize methods running and potentially competing with one another.

otacke's picture

You can reproduce this on all kinds of H5P integrations incl. H5P.com. Just size the viewport such that the content barely fits into it without scrollbars, then slowly reduce the viewport height until a scrollbar is required. That's when the resize loop that I described sets in.

https://drive.google.com/file/d/1JMmJtM0HBsfPCGLBiWE8LNojSS2fkX0b/view

diegoarielvega's picture

Hello Otocke!

Thanks for help! It`s just like you say an infinite resize loop. 

Is there a way to fix it? Is it because of the image size? Is there a recommended size for the interactive book content?

Thanks a lot!

Best regards.

otacke's picture

There's no fix without modifying the code. You never know what size the user's viewport has, so you can only guess that as soon as your page has a certain height, there will always be a scrollbar. So: add content to the page.