Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70445

H5P iframe flickers in firefox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.7.9
    • Fix Version/s: None
    • Component/s: H5P
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      We had this issue where the H5P iframe flickers in Firefox but working fine in other browers.

       

      We found out that firefox sometimes returns the value 1 for element clientHeight. in this case h5p-resizer.js functions prepareResize and resize change iFrame height to different values making the iFrame flickers.

       

      We solved it by changing

       

      iframe.style.height = data.clientHeight + 'px'

      by

      iframe.style.height = (data.clientHeight > data.scrollHeight ? data.clientHeight : data.scrollHeight) + 'px';

       

      Regards,

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              brunoilponseisae brunoilponseisae
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: