Results 1 to 6 of 6

Thread: displayfield chokes on long text

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7
    Vote Rating
    -10
      0  

    Default displayfield chokes on long text

    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.

    screenshot.png

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7
    Vote Rating
    -10
      0  

    Default

    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.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7
    Vote Rating
    -10
      0  

    Post

    Using this I can set the margin-top for all p tags except the first:

    Code:
    .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:

    Code:
    <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>

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7
    Vote Rating
    -10
      0  

    Default

    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?

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7
    Vote Rating
    -10
      0  

    Default

    Here is a screenshot that shows how the form stays within the window, but the displayfield extends below the window and form.

    firebug1.png

  6. #6
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505
    Vote Rating
    255
      0  

    Default

    Can you share a test case that demonstrates the issue you're seeing?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •