-
6 Jul 2010 7:16 AM #1
[OPEN-1110] Ext.form.TriggerField -> rendering hidden and IE8
[OPEN-1110] Ext.form.TriggerField -> rendering hidden and IE8
hi team,
somehow strange, that nobody posted this one before.
imagine a tabbed form with combos or other triggerFields.
the tabPanel has the config
in firefox or chrome this is no problem.Code:deferredRender : false
in ie8 this is a problem, only the active tab renders correctly.
to be more precise, inside the triggerField onRender method is the part:
although i have set a width-config for the combo, this.width seems to be null when rendering hidden.Code:if(!this.width){ this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); }
this is the part i do not understand yet
it might come from the rendering of Ext.BoxComponent, but i am not sure.
the rest is quite clear: since this.el.getWidth() will return 0 when rendering hidden, the wrap will get the same width as the trigger. the whole element itself has the right width, leading to my funny screenshot.
in my usecase, the combo is disabled. when enabling it, the width of the wrap is correct again. on the next disabling it is wrong again.
kind regards,
tobiu
p.s.: could not post the whole ie-console, since only images below 620px width are allowed in this vBulletin.
-
7 Jul 2010 10:01 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Please provide a test case, also are you doing layoutOnTabChange: true since you are doing deferredRender: false?
-
8 Jul 2010 6:56 AM #3
hi jamie,
i took the time to build a testcase for you.
i hope 40 lines of code is ok *g*
as mentioned above, this is an IE8-only-bug.Code:Ext.onReady(function(){ new Ext.form.FormPanel({ renderTo: document.body, width:600, height:250, layout:'fit', border:false, labelWidth : 100, items : [{ xtype: 'tabpanel', activeTab: 0, deferredRender: false, layoutOnTabChange: true, // or false, makes no difference plain:true, defaults:{autoScroll: true}, items:[{ title: 'Tab 1', html: "My content was added during construction." },{ title: 'Tab 2', layout: 'form', items: [{ store: new Ext.data.ArrayStore({ fields: ['abbr', 'state'], data : [['AL', 'Alabama'],['AK', 'Alaska']] }), displayField:'state', typeAhead: true, mode: 'local', triggerAction: 'all', selectOnFocus:true, fieldLabel: 'ComboBox', xtype: 'combo', width: 200, disabled:true //important, enabled renders fine }] } ] }] }); });
please let me know what you find out
kind regards,
tobiu
-
14 Jul 2010 4:48 AM #4
hi team,
my ext.element.getWidth - fix also fixes this issue:
kind regards,Code:Ext.onReady(function(){ Ext.override(Ext.Element, { getWidth : function(contentWidth){ var me = this, dom = me.dom, hidden = Ext.isIE && me.isStyle('display', 'none'), w = Math.max(dom.offsetWidth || parseInt(dom.style.width, 10), hidden ? 0 : dom.clientWidth) || 0; w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr"); return w < 0 ? 0 : w; } }); new Ext.form.FormPanel({ renderTo: document.body, width:600, height:250, layout:'fit', border:false, labelWidth : 100, items : [{ xtype: 'tabpanel', activeTab: 0, deferredRender: false, layoutOnTabChange: true, // or false, makes no difference plain:true, defaults:{autoScroll: true}, items:[{ title: 'Tab 1', html: "My content was added during construction." },{ title: 'Tab 2', layout: 'form', items: [{ store: new Ext.data.ArrayStore({ fields: ['abbr', 'state'], data : [['AL', 'Alabama'],['AK', 'Alaska']] }), displayField:'state', typeAhead: true, mode: 'local', triggerAction: 'all', selectOnFocus:true, fieldLabel: 'ComboBox', xtype: 'combo', width: 200, disabled:true //important, enabled renders fine }] } ] }] }); });
tobiu
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[OPEN-1084]Ext.ux.form.SpinnerField and non defered rendering
By tobiu in forum Ext 3.x: BugsReplies: 1Last Post: 29 Jun 2010, 5:26 AM -
[OPEN-3.2.1] Ext.form.insertAtCursor always inserts at the top in IE8
By mschering in forum Ext 3.x: BugsReplies: 0Last Post: 8 Jun 2010, 1:43 AM -
[OPEN-875] deferredRender: false radio/checkbox wrong in IE7 and IE8 in tabbed form
By ExtKD in forum Ext 3.x: BugsReplies: 2Last Post: 16 Apr 2010, 1:37 PM -
[FIXED-129][Ext 3.0.3] Form upload: hidden iframe not hidden in FF
By Stefan B in forum Ext 3.x: BugsReplies: 3Last Post: 9 Jan 2010, 7:33 AM -
[FIXED?] [3.0] TriggerField / r2213 and IE8
By stever in forum Ext 2.x: BugsReplies: 3Last Post: 14 Apr 2009, 8:30 PM


Reply With Quote