Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.13.6, 8.4.2
-
None
-
7.13
-
1
-
Severity 3 - Minor
-
0
-
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
- 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)
- Click Save and notice that the image shows full width of that comment/description field.
- Click the pencil to edit the comment. Make sure you are in the Visual edit mode.
- Make any type of change (but don't modify the image).
- Click Save and notice that the image is no longer scaled to the full size of the field.
- Click the pencil again and go back to Text editor mode
- 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:
- Does not appear to affect the Text editor at all, only the visual editor
- Credit to dave898462241 for reporting this bug in https://community.atlassian.com/t5/Jira-Software-questions/quot-width-100-quot-on-image-tags-gets-broken-on-subsequent/qaq-p/1211588
Workaround
None currently exist. Should a work-around be found, this will be updated to reflect this change.