From a527ef2032747a88e705ef7fa3047b6db48cbbe3 Mon Sep 17 00:00:00 2001 From: Mengjue Wang Date: Tue, 19 Jul 2016 10:37:08 -0700 Subject: [PATCH] Fix Popover problem for RTL 1/n Summary: Change modal.js to support RTL Reviewed By: javache Differential Revision: D3580776 fbshipit-source-id: e9ef3f340f52e38fd905dce6d14a74d3bd7b7982 --- Libraries/Modal/Modal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index 076123468..b91200132 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -11,6 +11,7 @@ */ 'use strict'; +const I18nManager = require('I18nManager'); const Platform = require('Platform'); const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); @@ -157,13 +158,14 @@ class Modal extends React.Component { } } +const side = I18nManager.isRTL ? 'right' : 'left'; const styles = StyleSheet.create({ modal: { position: 'absolute', }, container: { position: 'absolute', - left: 0, + [side] : 0, top: 0, } });