Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-70180

Using the Visual editor does not honor img tag attributes that use percentage characters

    XMLWordPrintable

Details

    Description

      Issue Summary

      Images added inline to either a description or a comment in Jira can be configured (in the text editor) to use specific image attributes such as height, width, valign, etc.  While these can use specific number of pixels, they can also be setup to use a percentage of the space, such as width="100%".   When you set this up in the text editor, it works just fine.  However any subsequent edits of that description/comment from any user using the visual editor will inadvertently drop the % character entirely from that img tag, leaving the image sized in pixels rather than percentage of the field on the screen.

       

      Steps to Reproduce

      1. Add a Comment to an existing issue and include an image citation with a width=100% attribute, such as:
        !scales.png|width=100%! 

        (this could also be done in the Description field as well)

      1. Click Save and notice that the image shows full width of that comment/description field.
      2. Click the pencil to edit the comment. Make sure you are in the Visual edit mode.
      3. Make any type of change (but don't modify the image).
      4. Click Save and notice that the image is no longer scaled to the full size of the field.
      5. Click the pencil again and go back to Text editor mode
      6. Notice that Jira removed the "%" character after the "100". You can reinsert the "%" to fix things, but the problem will recur every time you edit the comment using the Visual tab.

      Expected Results

      The image should remain unchanged and still appear as scaled to the full width of that field (100%)

      !scales.png|width=100%! 


       

      Actual Results

      The image now is exactly 100 pixels wide instead of 100% the width of that field in the users browser.

      !scales.png|width=100! 

      Notes:

      Workaround

      None currently exist. Should a work-around be found, this will be updated to reflect this change.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aheinzer Andy Heinzer
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: