Skip to content

Commit

Permalink
fix: the gesture conflict on some android devices
Browse files Browse the repository at this point in the history
  • Loading branch information
hellohublot committed Aug 14, 2024
1 parent 0146d97 commit c03108d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/react-native-tab-page-view",
"version": "1.0.11",
"version": "1.0.12",
"description": "React Native Tab Page View",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
4 changes: 3 additions & 1 deletion src/NestedTabView/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function NestedTabViewContainer(props: any) {
}}
onMoveShouldSetResponderCapture={(e: any) => {
const { locationX: x, locationY: y } = e.nativeEvent;
return Math.abs(x - point.current.x) > Math.abs(y - point.current.y);
const diffX = Math.abs(x - point.current.x);
const diffY = Math.abs(y - point.current.y);
return diffX + diffY > 5 && diffX > diffY;
}}
{...props}
/>
Expand Down

0 comments on commit c03108d

Please sign in to comment.