PDA

View Full Version : Component in window header



nextSTEP
3 May 2011, 2:33 AM
Hi,

I use following code to embed a text field into a window header, which almost works - in IE (9).
Not in Firefox (4.0).


Ext.app.Window = Ext.extend(Ext.Window,
{
render : function()
{
Ext.app.Window.superclass.render.apply(this, arguments);

var searchField = new Ext.form.TextField(
{
renderTo : this.header,
xtype : "textfield",
width : 160,
style : "position:absolute; top:9px; right:24px; border-bottom:0px; font-size:1.0em",
emptyText : "Search..."
});
}
});

Ext.onReady(function()
{
new Ext.app.Window(
{
title : "test window",
width : 300,
height : 300,
html : "Use Firefox and click into the search box."
}).show();
});

The text field does not get focus in Firefox. How can it be fixed? Using ExtJS 3.3.1