Image Sequencing problem

SirClickalot's picture

When using this particular content type, the images seem to be grabbing focus and on Drupal my site (based on Bootstrap 5), this causes the browser to scroll all the way down to the H5P interation on page load and that's definitely not what we want!

You can witness this happening right here: http://bit-by-bit.local/tutorials/beginning

Can anyone suggest a way to fix this?

Thank you

otacke's picture

See https://h5p.org/comment/52560#comment-52560. The fix would be very simple, but without someone willing to adopt the abandoned source code, there's nobody to apply the fix.

vishwakarmayojana's picture

Try adding this JS:

document.addEventListener("DOMContentLoaded", () => { document.querySelector('.h5p-container')?.setAttribute('tabindex', '-1'); });

 

This prevents H5P from auto-focusing. Also, check Bootstrap scroll settings and Drupal modules for unwanted focus behavior. 

vishwakarmayojana's picture

Try adding this JS:

document.addEventListener("DOMContentLoaded", () => { document.querySelector('.h5p-container')?.setAttribute('tabindex', '-1'); });

 

This prevents H5P from auto-focusing. Also, check Bootstrap scroll settings and Drupal modules for unwanted focus behavior. 

otacke's picture

Dear vishwakarmayojana!

Could you please explain why you keep posting these answers that obviously were generated by an AI and make no sense at all? Otherwise I'd like to ask BV to freeze your account.

The problematic element is not the one with the `.h5p-container` class, and it's neither Drupal nor Bootstrap causing the issue.

Best,
Oliver