Some diffs run under the sidebar

VERIFIED FIXED in 2011-06-21


8 years ago
8 years ago


(Reporter: verdi, Assigned: tgavankar)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [2011-06-16])



8 years ago
I can't figure out the steps to reproduce but many article diffs run under the sidebar on SUMO in their initial state. When they are expanded they go over the sidebar. I've only seen this issue on the initial state.

Here is an example from the How to set the home page article:

Here's another diff from that same article that isn't broken:

I see the same behavior on Fx 4 - 7, Mac and Windows.
I was unable to repro using large deletions and additions of text- although I can see the toggle underneath the sidebar on the examples above.

Comment 2

8 years ago
This seems to be caused by having very long words in the diff being styled with diff-sub or diff-add (giving them green/red highlights). In particular, a "long word" means an image/video filename. For some reason, it doesn't break the word for word-wrap if it's wrapped in a <span> (which only occurs if there's special markup around the text).

If you firebug out the td's with a <span> inside that contain long words (primarily image/video links), you'll see the table reshift back into it's original size.

Not sure what the fix is, since this HTML is all generated by difflib (afaik).
I think the issue is due to the weirdness of `display: table-cell;` which can have widths set but are kind of elastic. I put together a little example where I changed the <td/>s to `display: inline-block;` and then word-wrap behaves correctly again:

I tried giving td.text a width and setting `display:inline-block;` and it is promising. But then we need to probably set that back for the case of the full screen diff (`table.diff.full td.text`).


8 years ago
Assignee: nobody → tgavankar

Comment 4

8 years ago
Fixed in
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2011-06-21
Whiteboard: [2011-06-16]
Verified with same article, diff displays correctly when toggling teh diff- no longer displays under the sidebar.
You need to log in before you can comment on or make changes to this bug.