Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15475] Android: TiApp events are received out of order in a WebView

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.2, Release 3.1.3, Release 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, event, supportTeam
ReporterMeenakshi Pathak
AssigneeUnknown
Created2013-10-14T11:58:45.000+0000
Updated2018-02-28T20:04:14.000+0000

Description

In Android, TiApp events received are out of order. In the given test case, there is a window that includes a WebView and a ScrollViews set on top of different regions of it. The ScrollViews receive touch events. The ScrollViews listen for the scroll event and pass those along to the WebView via Ti.App.fireEvent calls which include the current offset of the ScrollView. Please find attached sample project to demonstrate the issue. Here are the logs of Android :
[DEBUG][TiAPI   (12917)]  Event scroll: 47
[DEBUG][TiAPI   (12917)]  Event scroll: 224
[DEBUG][TiAPI   (12917)]  Event scroll: 234
[DEBUG][TiAPI   (12917)] Section scroll offset: 234
[DEBUG][TiAPI   (12917)]  Event scroll: 462
[DEBUG][TiAPI   (12917)]  Event scroll: 631
[DEBUG][TiAPI   (12917)]  Event scroll: 771
[DEBUG][TiAPI   (12917)] Section scroll offset: 771
[DEBUG][TiAPI   (12917)]  Event scroll: 808
[DEBUG][TiAPI   (12917)]  Event scroll: 799
[DEBUG][TiAPI   (12917)]  Event scroll: 796
[DEBUG][TiAPI   (12917)] Section scroll offset: 796
[DEBUG][TiAPI   (12917)] Section scroll offset: 799
[DEBUG][TiAPI   (12917)] Section scroll offset: 808
[DEBUG][TiAPI   (12917)] Section scroll offset: 631
[DEBUG][TiAPI   (12917)] Section scroll offset: 462
[DEBUG][TiAPI   (12917)] Section scroll offset: 224
[DEBUG][TiAPI   (12917)] Section scroll offset: 47
Whereas logs of iOS :
[INFO] :   Native ScrollView offset: 136.5
[INFO] :   WebView scroll offset: 136.5
[INFO] :   Native ScrollView offset: 136
[INFO] :   WebView scroll offset: 134.5
[INFO] :   Native ScrollView offset: 134.5
[INFO] :   WebView scroll offset: 134.5
[INFO] :   Native ScrollView offset: 134.5
[INFO] :   WebView scroll offset: 134.5
[INFO] :   Native ScrollView offset: 134
[INFO] :   WebView scroll offset: 134
[INFO] :   Native ScrollView offset: 134
[INFO] :   WebView scroll offset: 134
[INFO] :   Native ScrollView offset: 133.5
[INFO] :   WebView scroll offset: 133.5
[INFO] :   Native ScrollView offset: 133
[INFO] :   WebView scroll offset: 133
[INFO] :   Native ScrollView offset: 132.5
[INFO] :   WebView scroll offset: 132.5
Note : This works as expected on iOS. However, on Android, the events received by the web view are out of order

Attachments

FileDateSize
AndroidScrollViewWebEvents.zip2013-10-14T11:58:45.000+00007783288

Comments

No comments

JSON Source