PDA

View Full Version : [CLOSED][3.0.3] Methods Element.scroll and Element.scrollTo stopped working



Qtx
12 Dec 2009, 11:15 PM
I am using the methods scrollTo and scroll to enable jump to the beginning or to the end of a panel. In 3.0.0, it worked well. I noticed that this does not work in 3.0.3 any more.

Here is the example, which works in 3.0.0 and does not work in 3.0.3


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Hello World Window Example</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
<script type="text/javascript" src="../ux/MultiSelect.js"></script>
<script type="text/javascript" src="../ux/ItemSelector.js"></script>

<script language="javascript">

Ext.onReady(function(){
var win;
var button = Ext.get('show-btn');

button.on('click', function(){

user_form = new Ext.Panel({

border: false,
trackResetOnLoad: true,
layout: 'anchor',
bodyStyle: 'background-color: transparent',
cls: 'x-border-layout-ct',

html: 'Line First<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line N<br>Line Last'

}); // user_form

user_window = new Ext.Window({

title: 'Test',

width: 500,
height: 400,

closeAction: 'close',
plain: true,
modal: true,

maximizable: false,
minimizable: false,
resizable: false,

layout: 'fit',
items: user_form_panel = new Ext.Panel({
id: 'user_form_panel',
xtype: 'panel',
autoScroll: true,
items: user_form,
border: false
}),

buttons: [
{
text: 'Up',
handler: function () {
user_form_panel.body.scrollTo("top", 0);
}
},
{
text: 'Down',
handler: function () {
user_form_panel.body.scroll("down", 10000000);
}
}
]

});

user_window.show();
});
});
</script>
</head>
<body>

<input type="button" id="show-btn" value="Show Window" />
</body>
</html>

evant
13 Dec 2009, 7:10 PM
This is corrected in SVN, it will be a part of 3.1.