Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8608 closed defect (fixed)

Code blocks overflow during preview

Reported by: Ryan Ollos <ryano@…> Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: ticket system Version: 0.11.5
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API 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 …

Attachments (1)

CodeBlockOverflow.png (205.6 KB ) - added by Ryan Ollos <ryano@…> 10 years ago.

Download all attachments as: .zip

Change History (13)

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

Attachment: CodeBlockOverflow.png added

comment:1 by Remy Blank, 10 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, 10 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, 10 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, 10 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@…>, 10 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, 10 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)

comment:7 by Remy Blank, 10 years ago

This seems to be an issue with the preview <fieldset>. If I replace it with a <div>, formatting is correct.

comment:8 by Remy Blank, 10 years ago

And we're not the only ones who seem to have noticed:

http://www.webmasterworld.com/css/3919380.htm

Incidentally, I have a suggestion for #8295 that removes the <fieldset>, which would fix this issue as well.

comment:9 by Remy Blank, 10 years ago

The same issue also exists in the wiki page preview (try TracStandalone, for example). The solution is probably to avoid <fieldset> for previews.

comment:10 by Remy Blank, 10 years ago

Milestone: 0.11.6next-minor-0.12.x

Pushing out to next minor 0.12, in case #8295 actually does solve the issue.

comment:11 by Remy Blank, 10 years ago

Milestone: next-minor-0.12.x0.12
Resolution: fixed
Status: newclosed

This was fixed as a part of #8295 in [8753] and [8754].

comment:12 by Remy Blank, 10 years ago

Owner: set to Remy Blank

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.