From 4dc4547af38d388e4c80650a6d1eed18720a3438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Kuhr=20J=C3=B8rgensen?= Date: Wed, 23 Jan 2019 14:31:46 +0100 Subject: [PATCH 1/3] Allow interaction through egg, iOS Allow interaction with touchable components inside egg on iOS. I experienced problems with text inputs in a webview that were hard to focus when the webview was put inside egg. This fix doesn't really help on Android. --- Egg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Egg.js b/Egg.js index fe8f586..de4889d 100644 --- a/Egg.js +++ b/Egg.js @@ -20,7 +20,7 @@ export default class Egg extends Component { componentWillMount() { this._panResponder = PanResponder.create({ onStartShouldSetPanResponder: (evt, gestureState) => true, - onStartShouldSetPanResponderCapture: (evt, gestureState) => true, + onStartShouldSetPanResponderCapture: (evt, gestureState) => false, onPanResponderGrant: (evt, gestureState) => { if (this.props.touchOpacity) { Animated.timing( From b589222b291cfb8b21c8588910dd187c33ce57fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Kuhr=20J=C3=B8rgensen?= Date: Fri, 20 Dec 2019 10:48:09 +0100 Subject: [PATCH 2/3] Replace deprecated componentWillMount with constructor --- Egg.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Egg.js b/Egg.js index de4889d..8776b18 100644 --- a/Egg.js +++ b/Egg.js @@ -15,9 +15,7 @@ export default class Egg extends Component { num: -1, opacity: new Animated.Value(1), }; - } - componentWillMount() { this._panResponder = PanResponder.create({ onStartShouldSetPanResponder: (evt, gestureState) => true, onStartShouldSetPanResponderCapture: (evt, gestureState) => false, From 3788f72c7b614934ebd5db95763af550840b7650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Kuhr=20J=C3=B8rgensen?= Date: Tue, 5 May 2020 15:02:26 +0200 Subject: [PATCH 3/3] Fix egg and webview interaction on iOS Fix egg not allowing touches to an underlaying webview on iOS --- Egg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Egg.js b/Egg.js index 8776b18..e369006 100644 --- a/Egg.js +++ b/Egg.js @@ -34,7 +34,7 @@ export default class Egg extends Component { this.gestureSetp(gestureState); }, onShouldBlockNativeResponder: (evt, gestureState) => { - return true; + return false; }, }); }