PDA

View Full Version : Textfield focus displaces view



newqreation
25 Jan 2012, 5:51 AM
Hi Everyone!

I have a problem with using a textfield in one of my views. When the textfield focuses the whole view is displaced.

You can see below:

How it should look:
31001

How it looks, when i press the textfield:
31002

How the view looks after editing the textfield.
31003

Have anyone experienced this before, or do anyone have a solution on this problem?

My code is below, (I have cleaned it up a bit):

ToolbarDemo.views.Actioncard = Ext.extend(Ext.Panel, { title: "Scan",
iconCls: "photo1",

layout: {
type: 'fit',
},
defaults: {
flex: 1
},
initComponent: function() {
Ext.apply(this, {
id: 'panelet2',

activeItem: 'spm',
items: [


{
xtype : 'carousel',
ui : 'dark',
id : 'spm',
fullscreen: true,
dockedItems: [{
xtype: "toolbar",
title: "Besvar",
ui: 'blue',
items: [

{
ui: 'back',
text: 'Annuller',
id: 'backButton2',
handler: toOpenScheme,

},
{ xtype: 'spacer' } ]
}],
items: [
{
items: [ {

items: [{
xtype: 'panel',
html: 'Købte du noget hos Elgiganten i dag? Hvor meget?',
style: 'margin-bottom: -20px;',
styleHtmlContent: true,
},
{
xtype: 'fieldset',

defaults: { xtype: 'radiofield', labelWidth: '83%' },
items: [
{ xtype: 'textfield', labelWidth: '60%', name : 'spm4', label: 'Ja', value : '0 kr' },
{ name : 'spm3', label: 'Nej', value : '2'},

]
}
],

}
]
}]
}]


});



ToolbarDemo.views.Actioncard.superclass.initComponent.apply(this, arguments);
}
});


Ext.reg('actioncard', ToolbarDemo.views.Actioncard);

I hope someone can help on this one. I really have no clue about how to fix this!