-
9 Jul 2012 5:20 AM #1
ScrollToEnd() goes to the begin on horizontal scrollable
ScrollToEnd() goes to the begin on horizontal scrollable
REQUIRED INFORMATION
Sencha Touch version tested:- Sencha Touch 2.0.1
Browser versions tested against:- Safari 5.1.7
- Mobile Safari iOS 5.1.1
- Google Chrome 19.0.1whatever
- ScrollToEnd() function on horizontal scrollable goes to the begin (same as scrollTo(0,0)) and not to the end.
Steps to reproduce the problem:- Set a scrollable with direction: 'horizontal'
- *.getScrollable().getScroller().scrollToEnd()
The result that was expected:
- On an horizontal scrollable the end is on the right, not on the left so the scrollToEnd() is exptected to go in that direction.
- Note that on vertical scrollable it works perfectly going to the bottom!
The result that occurs instead:- On an horizontal scrollable the scrollToEnd() goes to the left at the beginning
Test Case:
Code:Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'SenchaFiddle', launch: function() { Ext.create('Ext.Container', { fullscreen: true, layout: 'vbox', items: [ { xtype: 'panel', id: 'panel', height: 200, width: 200, scrollable: { direction: 'horizontal' //changing it to vertical goes to the bottom }, html: '<div style="width: 2000px; height: 2000px">Text text text text text text text text text text text text text text text text text text text text text</div>' }, { xtype: 'button', text: 'To the end', listeners: { tap: function () { Ext.getCmp('panel').getScrollable().getScroller().scrollToEnd(true); } } } ] }); } });
HELPFUL INFORMATION
See this URL for live test case: http://www.senchafiddle.com/#zL5f9
Possible fix:- To know the width of the component and make a scrollTo(x,y) instead scrollToEnd()
-
9 Jul 2012 6:41 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
Thanks for the report. It was only scrolling to the y end not x also.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3079
in
2.0.


Reply With Quote