Results 1 to 2 of 2

Thread: Textarea collapses to 3 lines when rendered in IE. In FF runs fine

  1. #1
    Ext JS Premium Member
    Join Date
    May 2010
    Posts
    145

    Default Textarea collapses to 3 lines when rendered in IE. In FF runs fine

    I have an application running multiple tabs and in some tabs are textareas. These textareas need to size to fit the area of the tab for each tab they fill. For now if I run the app in FF, I do not have an issue with the textareas. If I re-size the FF browser window, then the textareas re-size. If I run the same app in Internet Explorer, the textareas collapse down to 3 lines. How do I fix this? Do I need to set heights on the textareas? I want to still be able to keep the ability for the textareas to re-size as the browser re-sizes.

    this is how I have one of my textareas set up:
    Code:
    var panelPerforcePlf = {
            id          :   'panelPerforcePlf',
            title       :   'Create an engineering PLF from a CRM build',
            frame       :   true,
            layout      :   'anchor',
            labelAlign  :   'right',
            items       :   [
                {
                    xtype           :   'container',
                    height          :   80,                        // needs to be a fixed height?
                    labelWidth      :   100,
                    layout          :   'hbox',
                    layoutConfig    :   { align : 'stretch' },
                    items           :   [ fieldset1P4, fieldset2P4 ]
                },
                {
                    anchor          :   '0 -80',                  // For some reason, this won't work in IE. Works in every other browser.
                    items           :   [
                        {
                            xtype       :   'textarea',
                            style       :   'width: 98.5%; height: 99%;',
                            readOnly    :   true,
                            id          :   'plfContentP4'
                        }
                    ]
                }
            ]
        };

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You are overnesting. Why use a panel (without a layout!) to hold a textarea?

    Just use the textarea directly as one of the anchor layout items and specify the anchor in the config (and remove the style because 'anchor' will now set the size).

    ps. On older Ext versions you might need to specify a small negative width in the anchor to make it work in IE, e.g. anchor:'-3 -80'.

Similar Threads

  1. Gmap application - runs fine on local host but not on my web site
    By buttar in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 17 Jun 2010, 5:42 AM
  2. regex for limit new lines in textarea
    By mysticav in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 29 Sep 2009, 9:52 PM
  3. ForumInit() runs, ForumInit2() runs, but object isn't rendered
    By geewhizbang in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 28 Jul 2009, 11:49 PM
  4. Multiple lines in the value of TextArea?
    By sintax in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 20 Feb 2009, 7:02 PM
  5. Set textarea N lines high?
    By bdperk in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Feb 2008, 11:30 AM

Posting Permissions

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