You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/01/10 06:54:21 UTC

[incubator-weex] branch master updated: * [Android] try to fix js exception: scroll event.xxx is undefined (#2034)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 945e93b  * [Android] try to fix js exception: scroll event.xxx is undefined (#2034)
945e93b is described below

commit 945e93bc1c25f2cd1c1036ebe890612d6d320a3b
Author: chen <lu...@users.noreply.github.com>
AuthorDate: Thu Jan 10 14:54:16 2019 +0800

    * [Android] try to fix js exception: scroll event.xxx is undefined (#2034)
---
 .../com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java
index 85c43f9..dd375aa 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java
@@ -66,7 +66,10 @@ public class ScrollStartEndHelper implements Runnable{
             this.y = y;
             if(!hasStart){
                 if(component.getEvents().contains(Constants.Event.SCROLL_START)){
-                    component.fireEvent(Constants.Event.SCROLL_START, getScrollEvent(x, y));
+                    Map<String, Object> event = getScrollEvent(x,y);
+                    if (null !=event && !event.isEmpty()){
+                        component.fireEvent(Constants.Event.SCROLL_START,event);
+                    }
                 }
                 hasStart = true;
             }