aedos
3 Jun 2010, 2:22 PM
Ext Version:
3.2.2
Browser Version:
IE
Firefox
Description:
When the page content can't fit into the browser screen, our requirement is to show scroll bars, so that the user knows there is more content to see and would be able to access it.
In Firefox, the following code generates a horizontal scroll bar correctly, when the browser window is not wide enough to show all data.
In IE 7, horizontal scroll bar is missing, and the user has no clue that there are more data to see.
In IE 8, horizontal scroll bar will only show up when refreshing the browser, but not when resizing the window.
If remove "strict mode" (DOCTYPE at the top of the HTML source), scroll bar shows up for IE as well. However we can't use this as a solution because we need strict mode for good reasons.
Test Case:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
<script type="text/javascript" src="javascript/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="javascript/ext-all-debug.js"></script>
<script type="text/javascript">
var grid = {
xtype: 'editorgrid',
autoHeight:true,
store : {
xtype: 'arraystore',
data : [
[
'text 1',
'text 2',
'text 3',
'text 4',
'text 5',
'text 6',
'text 7',
'text 8',
'text 9',
'text 10',
'text 11',
'text 12'
]
],
fields : [
'f1',
'f2',
'f3',
'f4',
'f5',
'f6',
'f7',
'f8',
'f9',
'f10',
'f11',
'f12'
]
},
columns : [
{header:'Col 1', dataIndex:'f1'},
{header:'Col 2', dataIndex:'f2'},
{header:'Col 3', dataIndex:'f3'},
{header:'Col 4', dataIndex:'f4'},
{header:'Col 5', dataIndex:'f5'},
{header:'Col 6', dataIndex:'f6'},
{header:'Col 7', dataIndex:'f7'},
{header:'Col 8', dataIndex:'f8'},
{header:'Col 9', dataIndex:'f9'},
{header:'Col 10', dataIndex:'f10'},
{header:'Col 11', dataIndex:'f11'},
{header:'Col 12', dataIndex:'f12'}
]
}
Ext.onReady(function() {
new Ext.Viewport({
layout:'border',
items:[{
region:'center',
autoScroll: true,
frame:false,
defaults: {
autoHeight: true,
autoWidth: true
},
id: 'centerPanel',
layout: 'vbox',
align: 'stretch',
items:[ grid , {title:'Title', html:'Body'} ]
}]
})
});
</script>
</head>
</html>
3.2.2
Browser Version:
IE
Firefox
Description:
When the page content can't fit into the browser screen, our requirement is to show scroll bars, so that the user knows there is more content to see and would be able to access it.
In Firefox, the following code generates a horizontal scroll bar correctly, when the browser window is not wide enough to show all data.
In IE 7, horizontal scroll bar is missing, and the user has no clue that there are more data to see.
In IE 8, horizontal scroll bar will only show up when refreshing the browser, but not when resizing the window.
If remove "strict mode" (DOCTYPE at the top of the HTML source), scroll bar shows up for IE as well. However we can't use this as a solution because we need strict mode for good reasons.
Test Case:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
<script type="text/javascript" src="javascript/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="javascript/ext-all-debug.js"></script>
<script type="text/javascript">
var grid = {
xtype: 'editorgrid',
autoHeight:true,
store : {
xtype: 'arraystore',
data : [
[
'text 1',
'text 2',
'text 3',
'text 4',
'text 5',
'text 6',
'text 7',
'text 8',
'text 9',
'text 10',
'text 11',
'text 12'
]
],
fields : [
'f1',
'f2',
'f3',
'f4',
'f5',
'f6',
'f7',
'f8',
'f9',
'f10',
'f11',
'f12'
]
},
columns : [
{header:'Col 1', dataIndex:'f1'},
{header:'Col 2', dataIndex:'f2'},
{header:'Col 3', dataIndex:'f3'},
{header:'Col 4', dataIndex:'f4'},
{header:'Col 5', dataIndex:'f5'},
{header:'Col 6', dataIndex:'f6'},
{header:'Col 7', dataIndex:'f7'},
{header:'Col 8', dataIndex:'f8'},
{header:'Col 9', dataIndex:'f9'},
{header:'Col 10', dataIndex:'f10'},
{header:'Col 11', dataIndex:'f11'},
{header:'Col 12', dataIndex:'f12'}
]
}
Ext.onReady(function() {
new Ext.Viewport({
layout:'border',
items:[{
region:'center',
autoScroll: true,
frame:false,
defaults: {
autoHeight: true,
autoWidth: true
},
id: 'centerPanel',
layout: 'vbox',
align: 'stretch',
items:[ grid , {title:'Title', html:'Body'} ]
}]
})
});
</script>
</head>
</html>