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

Embedded HTML resources don't make full use of available space or are not big enough for the content

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • Resource

    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.

      Attachments

        Issue Links

          Activity

            People

              jrchamp Jonathan Champ
              jrchamp Jonathan Champ
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.