PDA

View Full Version : displayfield chokes on long text



glafrance
25 Jun 2013, 1:18 PM
In the screenshot below, the solution field text is being cutoff.

The control is displayfield, which I need to use for reasons I won't get into. I can't use a textarea, must use displaydield.

Is there a limit in the number of characters of text a displayfield can handle before exhibiting this behavior?

Thanks in advance.

44542

glafrance
26 Jun 2013, 10:10 AM
Actually, I found that its not directly the length of the text, but rather the overall height of the content rendered in the displayfield.

I am rendering HTML in the displayfield, and because ExtJS does not insert a blank line between <p> tags, I need to add this CSS:

.detailSolutionField tbody p {
margin-bottom:20px;
}

Its that margin-bottom for the last <p> tag that is causing the problem. That <p> tag really does not need the margin-bottom, because it is the last piece of content.

Any ideas for a workaround?

Thanks in advance.

glafrance
26 Jun 2013, 11:38 AM
Using this I can set the margin-top for all p tags except the first:


.detailCommentsField tbody p + p {
margin-top:20px;
}

But how can I then NOT set the margin top for the last p tag?

This is the html structure:


<table class="detailCommentsField">
<tbody>
<tr>
<td>
<div>
<p>long paragraph one</p> DOES NOT HAVE margin-top OK
<p>long paragraph two</p> DOES HAVE margin-top OK
<p>long paragraph three</p> DOES HAVE margin-top OK
<p>long paragraph four</p> DOES HAVE margin-top OK
<p>long paragraph five</p> HOW CAN I REMOVE margin-top FROM THIS p?
</div>
</td>
</tr>
</tbody>
</table>

glafrance
26 Jun 2013, 12:00 PM
Actually, that did not work.

The displayfield is in a form, and when I inspect with Firebug, I see the form is rendering/positioning correctly (bottom is about at the bottom of the window), but the displayfield and the generated table it resides in extend beyond the bottom of the form.

How can I prevent the displayfield from extending beyond the bottom of the form?

glafrance
26 Jun 2013, 12:32 PM
Here is a screenshot that shows how the form stays within the window, but the displayfield extends below the window and form.

44562

slemmon
26 Jun 2013, 9:42 PM
Can you share a test case that demonstrates the issue you're seeing?