Browse Source

fix(android): Revert scroll update from #281 (#889)

fixes #878
Thibault Malbranche 5 years ago
parent
commit
8f2ddf4542
No account linked to committer's email address

+ 1
- 19
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java View File

16
 import androidx.annotation.RequiresApi;
16
 import androidx.annotation.RequiresApi;
17
 import androidx.core.content.ContextCompat;
17
 import androidx.core.content.ContextCompat;
18
 import android.text.TextUtils;
18
 import android.text.TextUtils;
19
-import android.view.MotionEvent;
20
 import android.view.Gravity;
19
 import android.view.Gravity;
21
 import android.view.View;
20
 import android.view.View;
22
 import android.view.ViewGroup;
21
 import android.view.ViewGroup;
370
   public void setMessagingEnabled(WebView view, boolean enabled) {
369
   public void setMessagingEnabled(WebView view, boolean enabled) {
371
     ((RNCWebView) view).setMessagingEnabled(enabled);
370
     ((RNCWebView) view).setMessagingEnabled(enabled);
372
   }
371
   }
373
-
372
+   
374
   @ReactProp(name = "incognito")
373
   @ReactProp(name = "incognito")
375
   public void setIncognito(WebView view, boolean enabled) {
374
   public void setIncognito(WebView view, boolean enabled) {
376
     // Remove all previous cookies
375
     // Remove all previous cookies
947
       this.hasScrollEvent = hasScrollEvent;
946
       this.hasScrollEvent = hasScrollEvent;
948
     }
947
     }
949
 
948
 
950
-    @Override
951
-    public boolean onTouchEvent(MotionEvent event){
952
-
953
-      // Allow scrolling inside ScrollView
954
-      if (event.findPointerIndex(0) == -1) {
955
-        return super.onTouchEvent(event);
956
-      }
957
-
958
-      if (event.getPointerCount() >= 1) {
959
-        requestDisallowInterceptTouchEvent(true);
960
-      } else {
961
-        requestDisallowInterceptTouchEvent(false);
962
-      }
963
-
964
-      return super.onTouchEvent(event);
965
-    }
966
-
967
     @Override
949
     @Override
968
     public void onHostResume() {
950
     public void onHostResume() {
969
       // do nothing
951
       // do nothing