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

ATTO injects inline margin style that causes scroll bar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.0.5, 3.1.1, 3.2
    • Fix Version/s: None
    • Component/s: HTML Editor (Atto), Themes
    • Labels:
    • Environment:
      Report environment: Chrome Version 51.0.2704.103 m (64-bit) on Windows 7 - might be others.
    • Testing Instructions:
      Hide
      1. Select the Clean theme.
      2. Ensure that ATTO is the default editor.
      3. Edit a course.
      4. Add a label.
      5. Add an image.
      6. Observe that no scroll bar is present and that the image appears in full rather than having a portion hidden.
      Show
      Select the Clean theme. Ensure that ATTO is the default editor. Edit a course. Add a label. Add an image. Observe that no scroll bar is present and that the image appears in full rather than having a portion hidden.
    • Workaround:
      Hide

      A !important hack in the theme CSS, such as:

      img[style*="margin: 0 .5em;"] {
          margin: 0 !important;
      }
      

      Show
      A !important hack in the theme CSS, such as: img[style*="margin: 0 .5em;"] { margin: 0 !important; }
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE

      Description

      When inserting an image into a label resource with the ATTO editor it injects inline styles. One of these is 'margin: 0 .5em;' - this causes a horizontal scroll bar in Chrome (possibly other browsers).

      Tested in M3.1, might be other versions.

      Now tested in M3.0 and problem occurs there too.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gb2048 Gareth J Barnard
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                9 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 1 hour
                  2d 1h
                  Remaining:
                  0m
                  Logged:
                  Time Not Required
                  Not Specified