Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15474] Android : TiApp events are received out of order in a webView

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2017-07-20T18:55:31.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsAndroid
LabelsAndroid, event
ReporterMeenakshi Pathak
AssigneeEric Merriman
Created2013-10-14T11:46:59.000+0000
Updated2017-07-20T18:55:31.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:46:59.000+00007783288

Comments

  1. Lee Morris 2017-07-20

    Closing as duplicate of TIMOB-15475.

JSON Source