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

The atto "float right" margin CSS value is wrong.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7, 2.8
    • Fix Version/s: 2.7.2
    • Component/s: HTML Editor (Atto)
    • Labels:
    • Testing Instructions:
      Hide

      I think it is enough to check the inline style of an image with the "Developer Tools" of any browser:

      1. Open a test course in a Moodle installation.
      2. Add a »Page« resource.
      3. Fill in the »Name« and the »Description« field.
      4. Add some text in the »Page content« field.
      5. Position the cursor before the first character in the »Page content« field.
      6. Click on the editor's »Image« button to add an image.
      7. Select any image and choose any settings you want.
      8. Set image »Alignment« to »Right«.
      9. Save the image.
      10. »Save and display« the page resource.
      11. Inspect the HTML source of the image with the »Developer Tools« of the browser of your choice.
      12. The »style« attribute of the image must be »style="float:right; margin: 0 0 0 .5em;"«

      Show
      I think it is enough to check the inline style of an image with the "Developer Tools" of any browser: 1. Open a test course in a Moodle installation. 2. Add a »Page« resource. 3. Fill in the »Name« and the »Description« field. 4. Add some text in the »Page content« field. 5. Position the cursor before the first character in the »Page content« field. 6. Click on the editor's »Image« button to add an image. 7. Select any image and choose any settings you want. 8. Set image »Alignment« to »Right«. 9. Save the image. 10. »Save and display« the page resource. 11. Inspect the HTML source of the image with the »Developer Tools« of the browser of your choice. 12. The »style« attribute of the image must be »style="float:right; margin: 0 0 0 .5em;"«
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:

      Description

      The atto "float right" margin CSS value is wrong.

      In the file "lib/editor/atto/plugins/image/yui/src/button/js/button.js" the margin CSS for float right is set to "margin: '0 0 .5em 0'" which sets the margin at the bottom and not at the left image side.

      It should be "margin: '0 0 0 .5em'".

      I don't add a patch because this issue is easy to solve without.

        Attachments

          Activity

            People

            Assignee:
            urshunkler Urs Hunkler
            Reporter:
            urshunkler Urs Hunkler
            Peer reviewer:
            Tim Hunt
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Ankit Agarwal
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Sep/14