From 6a5225fb225baf452ee7eaa449e384a2889526b5 Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Thu, 9 Feb 2017 20:47:42 -0800 Subject: [PATCH] return if UIManager failed to measure node Summary: iOS return all 0 metrics for inside , which results immediate `onPressOut` event on press in. These kind of response should be ignored this solved issue #11462 Closes https://github.com/facebook/react-native/pull/11530 Differential Revision: D4541452 Pulled By: ericvicenti fbshipit-source-id: efd7bf1b380b1aecf7301b23f1fbd5a77a9e9095 --- Libraries/Components/Touchable/Touchable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/Components/Touchable/Touchable.js b/Libraries/Components/Touchable/Touchable.js index 7d2f526d8..e8f925e90 100644 --- a/Libraries/Components/Touchable/Touchable.js +++ b/Libraries/Components/Touchable/Touchable.js @@ -603,6 +603,10 @@ var TouchableMixin = { }, _handleQueryLayout: function(l, t, w, h, globalX, globalY) { + //don't do anything UIManager failed to measure node + if (!l && !t && !w && !h && !globalX && !globalY) { + return; + } this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate &&