[TIMOB-15474] Android : TiApp events are received out of order in a webView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-07-20T18:55:31.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | n/a |
Components | Android |
Labels | Android, event |
Reporter | Meenakshi Pathak |
Assignee | Eric Merriman |
Created | 2013-10-14T11:46:59.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
AndroidScrollViewWebEvents.zip | 2013-10-14T11:46:59.000+0000 | 7783288 |
Closing as duplicate of TIMOB-15475.