on desktop I can return to a scrolling list field at the same scroll position that I left it by noting the vScroll of the scrolling list field using the following code:
Code: Select all
-- when leaving the field the vScroll position is put into tScrollPosition
put the vScroll of field"display" into tScrollPosition
-- and returning to that vScroll position by the code in the 'go back' handler
set the vScroll of field "display" to tScrollPosition
I thought that this would also work in the same way on mobile but hadn't appreciated that although the user returns to the vScroll position, as soon as the mobile user starts to scroll, the tScrollPosition is replaced by the pVScroll of scrollerDidScroll (see below) and the field starts to scroll from the top rather than the returned to vScroll position!
Code: Select all
on scrollerDidScroll pHScroll, pVScroll
set the vScroll of field "display" to pVScroll
end scrollerDidScroll
Hope this makes sense!
Many thanks,
Kind regards,
Glenn