Results 1 to 2 of 2

Thread: [OPEN-1084]Ext.ux.form.SpinnerField and non defered rendering

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,750
    Vote Rating
    128
      0  

    Default [OPEN-1084]Ext.ux.form.SpinnerField and non defered rendering

    hi team,

    i am using the spinnerField inside a tabPanel with the config
    Code:
    deferredRender : false
    when the field is not in the first active tab,
    this leads to the following display errors:

    1) the width gets increased by about 20px (the width of the trigger-elements)

    Code:
            if (!f.width) {
                this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
            }
    2) the splitter-element (this.splitter) gets displayed over the left side of the input field

    Code:
    this.splitter.setRight((Ext.isIE) ? 1 : 2).setTop(10).show();
    the el.setTop() - method seems to work right, el.setRight() has no chance, since the width is not known when rendering the element invisible. maybe something like setLeft (el.getWidth() - (Ext.isIE) ? 1 : 2).

    i will try a bit more changing the constructor and let you know if i find a hotfix.


    with kind regards
    tobiu
    Best regards
    Tobias Uhlig

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,750
    Vote Rating
    128
      0  

    Default

    this fix might not be written perfect, but it seems to solve the issue.
    tested with defered and non defered rendering in firefox

    Code:
        doRender: function(ct, position){
            var el = this.el = this.field.getEl();
            var f = this.field;
            
            if (!f.wrap) {
                f.wrap = this.wrap = el.wrap({
                    cls: "x-form-field-wrap"
                });
            }
            else {
                this.wrap = f.wrap.addClass('x-form-field-wrap');
            }
    
            this.trigger = this.wrap.createChild({
                tag: "img",
                src: Ext.BLANK_IMAGE_URL,
                cls: "x-form-trigger " + this.triggerClass
            });
    
            if (!f.width) {
                this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
            }
    
            this.splitter = this.wrap.createChild({
                tag: 'div',
                cls: this.splitterClass,
                style: 'width:13px; height:2px;'
            });
            
            var tw = this.trigger.getWidth();
            tw = tw > 0 ? tw : 17;
            tw -= (Ext.isIE) ? 1 : 2;
            var l = (f.initialConfig.width - tw);
            this.splitter.setTop(10).setLeft(l).show();
    
            this.proxy = this.trigger.createProxy('', this.splitter, true);
            this.proxy.addClass("x-form-spinner-proxy");
            this.proxy.setStyle('left', '0px');
            this.proxy.setSize(14, 1);
            this.proxy.hide();
            this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
                dragElId: this.proxy.id
            });
    
            this.initTrigger();
            this.initSpinner();
        }
    Best regards
    Tobias Uhlig

Similar Threads

  1. Replies: 4
    Last Post: 23 Jul 2010, 4:51 AM
  2. Replies: 0
    Last Post: 29 Jun 2010, 5:54 AM
  3. [OPEN] [OPEN-1083] Ext.ux.form.SpinnerField -> removing focus css
    By tobiu in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 29 Jun 2010, 5:00 AM
  4. [FIXED][3.0.0] Ext.ux.form.SpinnerField
    By hschaefer123 in forum Ext 3.x: Bugs
    Replies: 4
    Last Post: 11 Jul 2009, 8:54 PM
  5. [2.??] Defered Focus causes much Grief in Grid
    By Mjollnir26 in forum Ext 2.x: Bugs
    Replies: 0
    Last Post: 10 Oct 2008, 5:34 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
  •