PDA

View Full Version : Google Chrome anchor size on combos



mysticav
22 Dec 2009, 12:07 AM
I'm using Ext 3.1, and I've found that when I define the width size on combo fields using the anchor property, chrome ignores it. Instead, it uses the default width.

I would like to know if somebody has faced this issue.

timhussey
4 Jan 2010, 7:10 AM
Please see the attached screenshot as proof of the problem

mysticav
12 Jan 2010, 12:17 AM
Yes. Did you find the solution ?

Condor
12 Jan 2010, 12:58 AM
Can you post a simple example?

timhussey
14 Jan 2010, 10:53 AM
this.topPanelForm = new Ext.Panel({
title: 'General',
layout: 'fit',
border: false,
bodyStyle: 'padding: 10px;',
items: [{
xtype: 'fieldset',
tools: [],
title: '  Opportunity Info  ',
autoHeight: true,
items:[{
layout: 'column',
border: false,
bodyStyle: 'padding: 10px;',
items:[{
columnWidth: 0.5,
border: false,
layout: 'form',
defaults: {
anchor: '-24'
},
items:[this.customerCombo,{
xtype: 'textfield',
fieldLabel: 'Name',
name: 'opportunity_name',
hiddenName: 'opportunity_name',
allowBlank: false
},{
xtype: 'textfield',
fieldLabel: 'Amount',
name: 'amount',
hiddenName: 'amount',
allowBlank: false
},{
xtype: 'combo',
fieldLabel: 'Lead Source',
hiddenName: 'lead_source',
store: this.leadSourceStore,
displayField: 'display_value',
valueField: 'save_value',
triggerAction: 'all',
editable: false,
mode: 'local',
allowBlank: false
},{
xtype: 'combo',
fieldLabel: 'Product',
hiddenName: 'product_id',
name: 'product_id',
store: this.opportunityProductsComboStore,
displayField: 'display_value',
valueField: 'save_value',
triggerAction: 'all',
mode: 'local',
editable: false,
allowBlank: false
},{
xtype: 'textfield',
fieldLabel: 'Quote ID',
name: 'quote_header_id',
disabled: true
}]
},{
columnWidth: 0.5,
border: false,
layout: 'form',
defaults: {
anchor: '-24'
},
items:[this.probabilityCombo,
this.statusCombo,{
xtype: 'datefield',
fieldLabel: 'Close Date',
name: 'close_date',
hiddenName: 'close_date'
},{
xtype: 'textfield',
fieldLabel: 'Created On',
name: 'created_on',
hiddenName: 'created_on',
disabled: true
},{
xtype:'combo',
anchor: '-20',
fieldLabel: 'Owner',
name: 'owner_id',
hiddenName: 'owner_id',
store: this.searchOwnerFilterStore,
editable: false,
displayField: 'display_value',
valueField: 'save_value',
mode: 'local',
triggerAction: 'all',
//listWidth: 180,
listeners:{
'select': function(combo, record, index) {
this.ownerID = record.data.save_value;
},
scope:this
}
},{
xtype: 'xiconcombo', //This is a custom IconComboBox that I extended off of ComBox...
anchor: '-20',
fieldLabel: 'Type',
name: 'type',
hiddenName: 'type',
store: new Ext.data.SimpleStore({
fields: ['save_value','display_value','icon'],
data: [
['R','Renewal','/images/icons/arrow_refresh.png'],
['N','New','/images/icons/star.png']
]
}),
valueField: 'save_value',
displayField: 'display_value',
iconClsField: 'icon',
useActualImages: true,
editable: false,
triggerAction: 'all',
mode: 'local'
}]
}]
}]
}]
});
Please see the attached IMAGE in my previous POST!
thanks for your help!

and like this thread suggests... everything works great in FF & IE, just not in Google Chrome or Safari.(WebKit)

-Tim:D

Condor
15 Jan 2010, 12:06 AM
Your layout is overnested. The fieldset should not contain a panel with layout:'column', it should BE layout:'column'.

timhussey
15 Jan 2010, 7:36 AM
Hey Condor,

I followed your advice, and even went in through my application where I was using Column Layouts in FieldsSets and de-overnested them... However the comboboxes and date fields
are still not correctly anchoring in Safari or Chrome...

maybe it's a deeper issue?

Condor
15 Jan 2010, 7:44 AM
I can't reproduce the problem with your code.

Are you sure you are not using some kind of override that isn't valid for Ext 3.1?

timhussey
15 Jan 2010, 7:46 AM
alright, i'll build a quick test app, using just the minimum layout pieces (since i've got a very complex app) and see if I still have the problem...If I do, then it must be something else...

thanks, i'll let you know!