Course Presentation Print button not visible on mobile phone

JRDingwall's picture
  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
    I was looking at my blogpost https://jrdingwall.ca/blogwall/using-interactive-checklists-and-to-do-li... on my iPhone and noticed the print button was not displaying. It does display on laptops and even my iPad (IMG 2947), just not on the iPhone (IMG 2382). 
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
    I'm using WordPress 5.8.2
  3. Mobile or Desktop
    Mobile, iPhone SE, iOS 14.8.1
  4. Browser: Chrome, Firefox, Safari etc
    Both Safari and Firefox for iOS
  5. H5P plugin version
    1.15.3
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
    Course Presentation 1.22.7
  7. Any browser console errors
    unknown
  8. Any PHP errors
    u
    nknown
  9. Screenshots if it's a visual problem
    attached
  10. Any recent changes to the environment (new plugins/modules, updates, configuration changes etc.)
    updated the content library before creating the activity
  11. Any recent changes to the browser you're using (new extensions, updates etc.)
    no recent updates beyond the iOS update
Attachments: 
Content types: 
otacke's picture

Hi!

I am not sure if that's really a bug in CoursePresentation (or a feature in iOS). CoursePresentation checks whether the browser reports to support printing in https://github.com/h5p/h5p-course-presentation/blob/33b4c1993c6046fb943386d524bf58cade8def28/src/scripts/printer.js#L19-L22 by checking for a print function being available. It suppose that iOS does not make the print function available inside iframes, so H5P cannot use it. A fix just for this issue would probably mean having to change CoursePresentation and H5P core - so that might take a while.

Cheers,
Oliver

JRDingwall's picture

Hi Oliver, thanks for the reply. That makes total sense, and it's not a huge deal for use cases I've come across. I was probably just tripped up because I saw it on one device and not the other, but the explanation makes sense. 

Thanks for the quick response!

Cheers, 

JR