Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10980] TableView scrollEnd event contentOffset y returns incorrect value upon release

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-09-25T20:38:45.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sRelease 3.0.0, Sprint 2012-20 Core, 2012 Sprint 20
ComponentsCore
Labelscore, tableView
ReporterJerod Fritz
AssigneeAnirudh Nagesh
Created2012-09-06T08:35:43.000+0000
Updated2017-03-28T22:52:25.000+0000

Description

TableView scrollEnd event contentOffset.y returns either 0 or table height regardless of the offset upon release preventing an implementation of pull to refresh. The Kitchen Sink app is a good example of 'Pull To Refresh' example failing because of the contentOffset.y=0 . Kitchen Sink example can be found here BaseUI->Views->Table Views->Pull to Refresh

Comments

  1. Anirudh Nagesh 2012-09-11

    Hi Jerod, The contentoffset is returning the appropriate values as and when you scroll and scrollback. I set tiapi.info statements to see e.contentoffset.y values and it changes accordingly. I believe you are testing the same thing. If you have any other sample reproducible test case , I will check it and let you know what can be done. Regards, Anirudh
  2. Jerod Fritz 2012-09-11

    The issue is not returning offset values during up and down scrolling it is returning the offset at which you released the view within the scrollEnd event. This is best illustrated as not working in your Kitchen Sink app. Specifically reference file ui/handheld/ios/baseui/table_view_pull_to_refresh.js and notice you are unable to reach lines 148-157 because the condition is never met due to the e.contentOffset.y value.
  3. Arthur Evans 2012-09-19

    In Release 2.1, there were a number of changes to the scrolling events to improve parity between platforms and consistency between different views. On iOS, TableView was firing the scrollEnd event when the user released the control (stopped dragging) instead of when the control stopped scrolling. Now it fires dragEnd when the finger is lifted and scrollEnd when the view actually stops moving. Given this behavior, I believe that scrollEnd is returning the correct contentOffset value. The Kitchen Sink example should have been corrected at that time, but it wasn't. This issue is reported as TIMOB-10677.
  4. Vishal Duggal 2012-09-25

    scrollend event in tableView has been redefined to match the definition in scrollView. Pull to refresh is now implemented using the dragend event.
  5. Lee Morris 2017-03-28

    Closing ticket as invalid.

JSON Source