[AC-2221] Crash in Kitchen Sink-> Base UI->Views-> Scroll Views->Basic->Scroll to Top
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-01-22T18:24:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | n/a |
| Reporter | Anatoliy Odukha |
| Assignee | Shak Hossain |
| Created | 2013-01-02T14:30:43.000+0000 |
| Updated | 2016-03-08T07:41:13.000+0000 |
Description
open Kitchen Sink-> Base UI-> Scroll Views->Basic-> and scroll down to button "Scroll to Top" click it
there is misprint in Ti/UI/ScroolView.js in scrollTo:
scrollTo: function(x, y) {
self._setTranslation(x !== null ? -x : this._currentTranslationX, y !== null ? -y : this._currentTranslationX);
},
self is undefined at this point, should be this here.
Hello, We tested this issue with the test code below. I can’t reproduce this issue in mobile web. Please check following code in latest version. If you use a different test case, please post it here.
Test Environment
Titanium SDK: 3.2.0. Titanium CLI: 3.2.0, Google chrome, Firefox Win 7, Mac OS X 10.8.5Test Code
Thanksvar win = Titanium.UI.createWindow({ title : 'scrollView Test' }); var scrollView = Titanium.UI.createScrollView({ contentWidth : 'auto', contentHeight : 'auto', top : 0, showVerticalScrollIndicator : true, showHorizontalScrollIndicator : true }); var view = Ti.UI.createView({ backgroundColor : '#336699', borderRadius : 10, width : 300, height : 2000, top : 10 }); scrollView.add(view); var button = Titanium.UI.createButton({ title : 'Scroll to Top', height : 40, width : 200, bottom : 10 }); view.add(button); button.addEventListener('click', function() { scrollView.scrollTo(0, 0); }); var button2 = Titanium.UI.createButton({ title : 'Add to Scroll View', height : 40, width : 200, top : 20 }); scrollView.add(button2); button2.addEventListener('click', function() { var view = Ti.UI.createView({ backgroundColor : 'red', borderRadius : 10, width : 300, height : 300, top : 2020 }); scrollView.add(view); }); win.add(scrollView); win.open();Closing since the issue is not reproducible with 3.2 TISDK.