PDA

View Full Version : [UNKNOWN][3.??] Google Chrome & Toolbars



defcon1
7 Jan 2010, 8:55 AM
Hi,

I am using ExtJS v3.1.0 and tried following simple code successfully with IE8 & FF3.5,
but Google Chrome crashes the layout:



<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<!-- ExtJS -->
<link rel="stylesheet" type="text/css" href="js/extjs310/resources/css/ext-all.css">
<script type="text/javascript" src="js/extjs310/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="js/extjs310/ext-all.js"></script>

<script type="text/javascript">

Ext.onReady(function(){

var wind = new Ext.Window({
plain: true,
bodyStyle: 'padding:0px;',
layout: 'fit',
items: new Ext.Panel({width:200,height:200}),
tbar: new Ext.Toolbar({
items: [
{
text: '123',
handler: function(a,b,c) {
alert ("123");
}
}
]
})
});

wind.show();
});


</script>

</head>
<body>

</body>
</html>

defcon1
7 Jan 2010, 12:03 PM
What I forgot to say: If you remove the tbar, it works with chrome ...

Condor
8 Jan 2010, 10:49 PM
This is not a valid layout.

You can't set a container without a size to layout:'fit'. The child panel wouldn't have an area to fit to!

You should move the width and height from the panel to the window.

defcon1
11 Jan 2010, 4:15 AM
Ok, I see ... works!

Many thanks! \:D/