From 1edcf4c6ac44cdf7229d55d900d552dc6ebe2541 Mon Sep 17 00:00:00 2001 From: Hedger Wang Date: Tue, 26 Jan 2016 01:27:14 -0800 Subject: [PATCH] Disable navigation bar right button when it's transparent. Reviewed By: chaceliang Differential Revision: D2863157 fb-gh-sync-id: ca73545303607333fe32cd8e2e8f040134ee1d24 --- .../Navigator/NavigatorBreadcrumbNavigationBar.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Libraries/CustomComponents/Navigator/NavigatorBreadcrumbNavigationBar.js b/Libraries/CustomComponents/Navigator/NavigatorBreadcrumbNavigationBar.js index b142b18fb..84a1e43cd 100644 --- a/Libraries/CustomComponents/Navigator/NavigatorBreadcrumbNavigationBar.js +++ b/Libraries/CustomComponents/Navigator/NavigatorBreadcrumbNavigationBar.js @@ -134,9 +134,13 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({ this._setPropsIfExists('title_' + index, TITLE_PROPS[index]); } var right = this.refs['right_' + index]; - if (right && - interpolate.RightItem(RIGHT_BUTTON_PROPS[index].style, amount)) { - right.setNativeProps(RIGHT_BUTTON_PROPS[index]); + + const rightButtonStyle = RIGHT_BUTTON_PROPS[index].style; + if (right && interpolate.RightItem(rightButtonStyle, amount)) { + right.setNativeProps({ + style: rightButtonStyle, + pointerEvents: rightButtonStyle.opacity === 0 ? 'none' : 'auto', + }); } },