Results 1 to 2 of 2

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

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2010
    Vote Rating

    Default [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

    • I wanted to use something similar to the form vbox layout example (, 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:
                  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.
      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
    Utrecht, The Netherlands
    Vote Rating

    Default 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 in forum Community Discussion
    Replies: 2
    Last Post: 26 Apr 2007, 9:52 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