Image Sequencing tooltips not working since H5P was upgraded to jQuery 3.5.1

otacke's picture

Hi H5P community!

Problem:

When image description texts become too long to be displayed, Image Sequencing creates tooltips and uses these to display the complete text. Those tooltips don't show properly when using the latest version of H5P core (that's currently deployed in the moodle plugin only). There's a crash within jQuery's offset function.

Likely cause:

Image Sequencing uses H5P's jQueryUI library (patched version of jQueryUI 1.10.2) to create and display the tooltips. That library in turn uses jQuery. In May 2020, H5P core got an update from jQuery 1.9.1 to jQuery 3.5.1 (currently deployed in the moodle plugin) and Image Sequencing fails since then.

Possible solutions:

1) Check whether jQueryUI 1.10.2 is not fully compatible with jQuery 3.5.1 anymore. In that case, updating jQueryUI to the latest version 1.12.1 could solve the issue. Problem: jQueryUI had been patched by the H5P core team, so it might be necessary to check whether these patches need to be re-applied or not - and if there are other problems when upgrading.

2) Remove the jQueryUI tooltip dependency from Image Sequencing and replace it with a different solution. Problem: Image Sequencing seemingly is not being maintained by the author (Jithin Thankachan) currently, so the H5P core team might have to maintain their own fork like they did for Find-Multiple-Hotspots.

3) Live with it! The H5P core team cannot take responsibility for all the externally contributed content types that have been abandoned by their respective authors just like e.g. the WordPress core team cannot guarantee that all the plugins will run forever without being updated.

@BV I could change the tooltip implementation as described in 2, but still the H5P core team would have to be involved to have a destination repository for a pull request - so it might be useful to create a ticket for this issue.

Cheers,
Oliver

Summary: 
Tooltips not working in Image Sequencing
Content types: 
serettig's picture

Did I miss a release? I thought the stable version doesn't have jquery 3.5.1.

I'm not a jquery expert, but might it be also possible to use query-migrate in the minified version to keep old libraries compatible?

otacke's picture

Hi Sebastian!

Maybe.

when using the latest version of H5P core (that's currently deployed in the moodle plugin only)

Take a look: Release 1.21 of the moodle plugin uses the moodle-1.21 tag of PHP core that already contains jQuery 3.5.1.

[edit] Neither am I a jQuery expert.

Best,
Oliver