Bläddra i källkod

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

fixes #878
Thibault Malbranche 5 år sedan
förälder
incheckning
8f2ddf4542
No account linked to committer's email address

+ 1
- 19
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java Visa fil

@@ -16,7 +16,6 @@ import android.os.Environment;
16 16
 import androidx.annotation.RequiresApi;
17 17
 import androidx.core.content.ContextCompat;
18 18
 import android.text.TextUtils;
19
-import android.view.MotionEvent;
20 19
 import android.view.Gravity;
21 20
 import android.view.View;
22 21
 import android.view.ViewGroup;
@@ -370,7 +369,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
370 369
   public void setMessagingEnabled(WebView view, boolean enabled) {
371 370
     ((RNCWebView) view).setMessagingEnabled(enabled);
372 371
   }
373
-
372
+   
374 373
   @ReactProp(name = "incognito")
375 374
   public void setIncognito(WebView view, boolean enabled) {
376 375
     // Remove all previous cookies
@@ -947,23 +946,6 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
947 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 949
     @Override
968 950
     public void onHostResume() {
969 951
       // do nothing