Edgewall Software

Opened 15 years ago

Last modified 14 years ago

#8608 closed defect

Code blocks overflow during preview — at Version 6

Reported by: Ryan Ollos <ryano@…> Owned by:
Priority: normal Milestone: 0.12
Component: ticket system Version: 0.11.5
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

I think this must have been reported already, but I've search and cannot find a bug report.

In a ticket, the code blocks overflow the screen (i.e. there is no scroll bar) during preview, as shown in the attached screen capture.

Actually, any wide enough content with a CSS specifying white-space: pre, like the following line generated using the [[span()]] macro:

a very long line … a very long line … a very long line … a very long line … a very long line … a very long line … a very long line … a very long line …

Change History (7)

by Ryan Ollos <ryano@…>, 15 years ago

Attachment: CodeBlockOverflow.png added

comment:1 by Remy Blank, 15 years ago

Milestone: 0.11.6

We have commented on that in several tickets, but AFAIK there's indeed no explicit ticket. I'll look into this, but it's low priority at the moment. A working patch would obviously speed up the process :-)

comment:2 by Christian Boos, 15 years ago

No, it's not been reported before but briefly discussed in #8094, when I stumbled upon Sebastian's patch for that: https://svn.mayastudios.de/mtpp/browser/trac-patches/0.11/0.11.5/101_fix-ticket-preview-width.patch

However, I didn't feel like adding yet another hard-coded value in the CSS. Problem is, I have no idea if there's another way.

Also, with the recently discussed idea on Trac-dev to have a layer on top of CSS (possibly {less}, preferably Genshi templates for the CSS files), we could use a variable for the ticket width and some expression reusing it for the ticket preview width. But that would be 0.12/0.13.

If there's a CSS expert out there who has a better idea, let us know.

In order to get a pragmatic solution for this long standing and annoying issue which was there for the whole 0.11.x period, maybe we can nevertheless apply Sebastian's patch for 0.11.6? Feedback welcomed… and actually Remy gave some feedback even before I asked for it ;-) Still, Remy, what do you think about that patch?

comment:3 by Christian Boos, 15 years ago

Interestingly, IE8 seems not have a problem with the preview, and indeed the preview fieldset is contained within the .ticket#content div, the one which has width: 700px. So it should work in other browsers?

comment:4 by Christian Boos, 15 years ago

Works also with Opera 9.64, but not with:

  • Safari 4.0.3.
  • Chrome 3.0.195.6.
  • Firefox 3.5.2.

(all tested on Windows)

And yes, for the cases where it fails, this happens only when there's a white-space: pre involved somewhere in the content, not only a code-block.

e.g. with a span: a very long line … a very long line … a very long line … a very long line … a very long line … a very long line … a very long line … a very long line …

comment:5 by Ryan Ollos <ryano@…>, 15 years ago

I omitted the obvious important fact. I'm using Google Chrome 2.0.172.39 on Win Vista x64. If you have a good eye for browser styles you might have figured that out from the screen capture :)

comment:6 by Christian Boos, 15 years ago

Description: modified (diff)

(adding the example from comment:4 in the description, so that all previews on this ticket will show the effect)

Note: See TracTickets for help on using tickets.