[AC-793] In a scrollview, the scrollingEnabled property is causing a scrollToTop
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-07-29T06:59:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Titanium SDK & CLI |
Labels | 3.2.2.GA, alloy, ios |
Reporter | Lucas Alves |
Assignee | Mauro Parra-Miranda |
Created | 2014-04-21T17:35:16.000+0000 |
Updated | 2016-03-08T07:37:04.000+0000 |
Description
When using a scrollView, there is a case (the "y" event is negative) when setting scrollingEnabled to false causes the scrollView to scroll to top position (instead of just disabling the scroll and remaining on the current position).
Test case:
var scroll = Ti.UI.createScrollView({
height: Ti.UI.FILL,
width: Ti.UI.FILL
});
var view1 = Ti.UI.createView({
height: 2000,
backgroundColor: 'black'
});
scroll.add(view1);
scroll.scrollTo(0,-50); // HAS TO BE A NEGATIVE VALUE !!!
scroll.scrollingEnabled = false;
Sorry, I just realized I opened this in the wrong place.
Let us know if we should resolve it then.
Yes, please. I just thought for a sec it should be in TIMOB.
I ran your test with and without setting scrollingEnabled and the behavior is same i.e. it does not scroll to the top. Here is the updated test case that does not reproduce this issue.
Ok, I reviewed my test case, turns out the problem only happens during a scroll event. Try this test case:
What you will see: When you scroll down to -60, the view1 (blue background) immediately scrolls back to the top. Whats is expected: view1 should be locked in place, only scrolling should be disabled.
I still cannot reproduce this issue with the provided test. Can you please zip up your test project and attach it to this ticket?
Tried with the attached testcase without success.