Results 1 to 2 of 2

Thread: [FIXED-917][3.2.1]HtmlEditor global ls is now a var ls - changes functionality

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504

    Exclamation [FIXED-917][3.2.1]HtmlEditor global ls is now a var ls - changes functionality

    In the function toggleSourceEdit:
    "ls" has been change from a global to a var.
    this changes the previous functionality...maybe ls should be a property "this.ls" assuming "this.setSize(ls)" is important

    Code:
    toggleSourceEdit : function(sourceEditMode){
     var iframeHeight,
      elHeight,
      ls;
     if (sourceEditMode === undefined) {
      sourceEditMode = !this.sourceEditMode;
     }
     this.sourceEditMode = sourceEditMode === true;
     var btn = this.tb.getComponent('sourceedit');
     if (btn.pressed !== this.sourceEditMode) {
      btn.toggle(this.sourceEditMode);
      if (!btn.xtbHidden) {
       return;
      }
     }
     if (this.sourceEditMode) {
      // grab the height of the containing panel before we hide the iframe
      ls = this.getSize();
      iframeHeight = Ext.get(this.iframe).getHeight();
      this.disableItems(true);
      this.syncValue();
      this.iframe.className = 'x-hidden';
      this.el.removeClass('x-hidden');
      this.el.dom.removeAttribute('tabIndex');
      this.el.focus();
      this.el.dom.style.height = iframeHeight + 'px';
     }
     else {
      elHeight = parseInt(this.el.dom.style.height, 10);
      if (this.initialized) {
       this.disableItems(this.readOnly);
      }
      this.pushValue();
      this.iframe.className = '';
      this.el.addClass('x-hidden');
      this.el.dom.setAttribute('tabIndex', -1);
      this.deferFocus();
      this.setSize(ls);
      this.iframe.style.height = elHeight + 'px';
     }
     this.fireEvent('editmodechange', this, this.sourceEditMode);
    },
    

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    [type]: fix
    [module]: HTMLEditor
    [id]: #917
    [desc]: Fixes #917. Change ls to a property 'previousSize'.

Posting Permissions

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