Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    12
    Vote Rating
    3
    rixo is on a distinguished road

      0  

    Default [OPEN-1169] Flex options is ignored for HtmlEditor in vbox layout

    [OPEN-1169] Flex options is ignored for HtmlEditor in vbox layout


    Ext version tested:
    • Ext 3.2.1

    Adapter used:
    • ext

    css used:
    • only default ext-all.css

    Description:
    • I wanted to use something similar to the form vbox layout example (http://www.sencha.com/deploy/dev/exa...vbox-form.html), with a htmleditor instead of a textarea.

      I just changed the xtype of the field in the example, and the editor is just not correctly sized in the form (it remains of fixed height 304), and seems to completly ignore the flex option. This notably induces some problems with the scrolling of the htmleditor.

      See the Test Case for a complete example of the problem.

    Test Case:
    Debugging already done:
    • By looking into the source code, I found that the layout ignores the flex option if it finds an height property in the field item, and beside that, I saw that the HtmlEditor sizes itself on render, thus giving itself an height even if none has been explicitly set.

      This is the relevant bit of code, at the end of the HtmlEditor onRender method:
      Code:
              if(!this.width){
                  var sz = this.el.getSize();
                  this.setSize(sz.width, this.height || sz.height);
              }

    Possible fix:
    • Here is a fix usable with current version of ext, for people who might need to use this fonctionnality before it is fixed in the released version. Tested and working in FF/Chrome Linux.
      Code:
      var htmleditor = new Ext.form.HtmlEditor({
      	xtype: 'htmleditor',
      	fieldLabel: 'Message text',
      	hideLabel: true,
      	name: 'msg',
      	flex: 1  // Take up all *remaining* vertical space
      
      	// *Fix* Overridding the onRender method, in order to
      	// unset the height and width property, so that the
      	// layout manager won't consider this field to be of
      	// fixed dimension, thus ignoring the flex option
      	,onRender: function() {
      		Ext.form.HtmlEditor.prototype.onRender.apply(this, arguments);
      		delete this.height;
      		delete this.width;
      	}
      });

  2. #2
    Sencha User
    Join Date
    May 2008
    Location
    Utrecht, The Netherlands
    Posts
    23
    Vote Rating
    0
    Funcracker is on a distinguished road

      0  

    Default Thanks for the fix!

    Thanks for the fix!


    This bug still exists in the latest Ext 3.3 beta - I didn't check the latest build.

    Anyway, I am very grateful for your fix as this saves me a good many hours debugging and trying to come up with my own solution (probably an extension to the HtmlEditor ).

Similar Threads

  1. [OPEN-770] vbox layout with collapsible items
    By vladsch in forum Ext 3.x: Bugs
    Replies: 11
    Last Post: 12 Aug 2010, 12:08 PM
  2. vBox layout with flex and hiding a panel
    By Keith Chadwick in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 8 Dec 2009, 8:48 AM
  3. vbox in tabbed containers flex not filling height
    By ImShogun in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 5 Dec 2009, 1:54 AM
  4. NEWS: Adobe flex goes open source
    By jay@moduscreate.com in forum Community Discussion
    Replies: 2
    Last Post: 26 Apr 2007, 9:52 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar