Results 1 to 7 of 7

Thread: [2.2] Combobox, IE and hideTrigger:true bug

  1. #1

    Default [2.2] Combobox, IE and hideTrigger:true bug

    Hi there

    I had exactly the same problem as described here:
    http://extjs.com/forum/showthread.ph...ox+hidetrigger

    You can easily reproduce it:

    - Add combobox
    - use configOption: hidetrigger:true;
    - Display in Internet Exporer

    After debugging for an hour I found out, that its a bug in the ext code.

    The field will be displayed wrong, as soon as you use this configoption for a combobox ONLY on IE:
    hideTrigger:true


    On line 26690 in the newest version og ext-all-debug.js you found this code:
    Code:
        afterRender : function(){
            Ext.form.TriggerField.superclass.afterRender.call(this);
            var y;
            if(Ext.isIE && this.el.getY() != (y = this.trigger.getY())){
                this.el.position();
                this.el.setY(y);
            }
        },
    Comment out the tree lines, that are changing the y position:
    Code:
        afterRender : function(){
            Ext.form.TriggerField.superclass.afterRender.call(this);
            var y;
            //if(Ext.isIE && this.el.getY() != (y = this.trigger.getY())){
            //   this.el.position();
            //   this.el.setY(y);
            //}
        },
    If you comment out the lines above, it will display correctly. This is only a workaround to show, that its a bug of ext and not a css thing. The element.style contains a -xxx value in IE.

    Please give me a feedback as soon as you have fixed this for real. Thx

  2. #2

    Default

    Thank you, your post helped me to resolve problem with datefield, which was not showed in IE7 with hideTrigger: true.

  3. #3

    Default

    I would be super interested to know what that commented out code is supposed to be doing. Just commenting out code seems a bit fishy to me and might cause other un-related bugs.

    With that said, this fix does seem to work and allowed the hideTrigger config to be applied like it should.

    Heres some better code for those not using the ext-all-debug.js file in production

    Code:
    Ext.form.TriggerField.override({
        afterRender: function() {
             Ext.form.TriggerField.superclass.afterRender.call(this);
        }
    });

  4. #4

    Default

    Same behaviour with Ext.form.DateField and hideTrigger=true in configuration

    Guteman's fix works great for me. thanks.

  5. #5

    Default

    I just found this bug yesterday. It's been so long since FF and IE disagreed w/in Ext that I was sure it was me ...

    Luckily, in my case, the trigger needn't be hidden

    --dan

  6. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,247

    Default

    The aboove fix looks ok, however it should check first if the field has a hidden trigger or not.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    4

    Default

    Here is the proper fix (already in SVN): http://extjs.com/forum/showthread.php?p=204817

Posting Permissions

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