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

Embedded HTML resources don't make full use of available space, and have extra scrollbars.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Resource
    • Labels:
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Related to MDL-22446, MDL-22736, MDL-29624, MDL-29987...

      When using the "Embed" display option for a HTML file in mod_resource, space is wasted around the embedding object element, and an extra scrollbar appears if the embedded HTML is bigger than the object element (see attached embed-html-dist.png).

      The attached embedheight.patch changes M.util.init_maximised_embed() to find the height of the embedded HTML via DOM getContentDocument, and resizes the object to not need scrollbars (see attached embed-html-patched.png).

      Unfortunately this isn't ready for release as:
      1. IE < 8 don't like it (although it seems to be no worse than without the patch for those browsers), and
      2. The embedded HTML height changes depending on how it's queried:
      automatically from M.util.init_maximised_embed(), or
      manually from JS console.

      FF 9
      auto: 2969
      manual: 2585

      Chromium 14
      auto: 2968
      manual: 2584

      IE 9
      auto: 19871
      manual: 2633

      For Firefox and Chromium it's not too bad, but IE is out by an order of magnitude!

      So - not production ready, but I wanted to post what I've done so far in case someone else can figure out how to fix those issues.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: