Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28398] TiAPI: convertPointToView() ignores "contentOffset" in ScrollView

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2021-06-18T18:15:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.1
ComponentsAndroid, iOS
LabelsScrollView, android, contentOffset, convertPointToView, ios
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-03-18T03:37:29.000+0000
Updated2021-06-18T18:15:01.000+0000

Description

*Summary:* When calling [convertPointToView()](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-method-convertPointToView) where the "destinationView" argument is a [ScrollView](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ScrollView), the [contentOffset](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ScrollView-property-contentOffset) should be applied. Supporting this would make it easier to scroll to a child view within the scroll view. *Steps to reproduce:*

Build and run [^ScrollViewOffsetVerticalTest.js] for Android or iOS.

Tap on the "Navigate" button in the bottom right corner.

Select "Blue View" in the dialog.

Notice that the top of the blue view is scrolled to the top of the scroll view. _(This is good.)_

Tap on the "Navigate" button and select "Blue View" again.

Notice you are scrolled somewhere else. _(This is bad. It should not have scrolled at all.)_

Attachments

FileDateSize
ScrollViewOffsetVerticalTest.js2021-03-18T03:31:17.000+00001714

Comments

  1. Joshua Quick 2021-03-18

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12617

JSON Source