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

Atto link insertion on image fails

XMLWordPrintable

      Reproduction with expectation

      Given I am using Firefox
      And my editor is set to Atto
      And I am on my Profile Editing page
      And I set the HTML content of the editor to:

      <img src="https://moodle.org/theme/moodleorg/pix/moodle_logo_TM.svg" alt="It's the Moodle" width="204" height="61" class="img-fluid atto_image_button_text-bottom">
      

      When I click on the image
      And I preess the link button
      And I set the link to https://moodle.org/
      And I se the title to My link title
      And I save changes
      Then the image should have an anchor around it with an href value of https://moodle.org/
      And the image anchor should have a title of My link title

      Actual

      The image anchor is set to My link title
      The image href is not set

      h3 Diagnosis

      The behaviour has changed somewhere between Firefox 105.0.3 and Firefox 109.0.1

      If you enter the original content into Atto, and select it, then using developer console run:

      document.execCommand('createLink', null, 'https://moodle.org/');
      

      Then the content is replaced with:

      <a _moz_dirty=""><img src="https://moodle.org/theme/moodleorg/pix/moodle_logo_TM.svg" alt="It's the Moodle" width="204" height="61" class="img-fluid atto_image_button_text-bottom"></a>
      

      Afetr much fiddling and trying to work out what's going on I discovered that this is linked to the use of the atto_image_button_text-button class, and specifically the fact that this class has a property set of:

      display: inline-block;
      

      https://bugzilla.mozilla.org/show_bug.cgi?id=1906559

            dobedobedoh Andrew Lyons
            sarjona Sara Arjona (@sarjona)
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 24 minutes
                2d 24m

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