View Issue Details

IDProjectCategoryView StatusLast Update
0023336mantisbthtmlpublic2018-09-04 01:23
Reporterj_schultz Assigned Toatrol  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product Version2.6.0 
Target Version2.17.0Fixed in Version2.17.0 
Summary0023336: Inline image attachments should have their own container to prevent scrolling
Description

If a large image is displayed as an inline attachment, it may cause the browser to add a horizontal scrollbar to the entire comments section.
You can for example observe this in bug 0022323. A single image causes all comments to be displayed with a line length that is wider than the browser viewport.,The scrollbar is found at the very end of the comments section, largely decreasing the usability of the comments section in this case.

Putting overflow:auto or overflow:scroll on the <div> that contains the inline attachments should hopefully fix this issue.

TagsNo tags attached.

Relationships

has duplicate 0022255 closedatrol Previewing images in bug notes result in table resizing 

Activities

dregad

dregad

2017-09-09 18:51

developer   ~0057647

I confirm the behavior and agree this should be fixed.

jeromedl

jeromedl

2018-06-07 08:04

reporter   ~0060042

We patched this issue with adding this css rule:

.bug-attachment-preview-image img {
max-width: 100%;
}

j_schultz

j_schultz

2018-06-07 17:11

reporter   ~0060044

A surprisingly simple solution compared to what I have tried before, and it seems to work beautifully!

jeromedl

jeromedl

2018-06-08 04:08

reporter   ~0060047

Thanks @j_schultz !
Indeed, keeping the image fully displayed with respect to the proportions, I believe it's a better solution than adding an horizontal scrollbar.

atrol

atrol

2018-07-28 18:03

developer   ~0060330

PR https://github.com/mantisbt/mantisbt/pull/1375
I added also a handling for preview of text attachments with long lines.

Related Changesets

MantisBT: master 5779ad24

2018-07-28 13:57

atrol


Details Diff
Prevent scrollbar when displaying wide attachments

Fixes 0023336
Affected Issues
0023336
mod - css/default.css Diff File