Skip to content

Commit 5e25df3

Browse files
committed
Fix <TextInput autoFocus /> property
update platform detections
1 parent b21a164 commit 5e25df3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Examples/UIExplorer/DragnDropExample.osx.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ var DragExample = React.createClass({
4949
onDragEnter={() => this.setState({dragOver: true})}
5050
onDragLeave={() => this.setState({dragOver: false})}
5151
onDrop={(e) => this.setState({files: e.nativeEvent.files, dragOver: false})}>
52-
<Text style={{fontSize: 14, color: 'white'}}>
53-
{this.state.files ? this.state.files : 'Drag here a file'}
52+
<Text style={{fontSize: 14, color: 'black'}}>
53+
{this.state.files.length > 0 ? this.state.files : 'Drag here a file'}
5454
</Text>
5555

5656
</View>

Libraries/Components/TextInput/TextInputState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var TextInputState = {
4040
focusTextInput: function(textFieldID: ?number) {
4141
if (this._currentlyFocusedID !== textFieldID && textFieldID !== null) {
4242
this._currentlyFocusedID = textFieldID;
43-
if (Platform.OS === 'ios') {
43+
if (Platform.OS === 'ios' || Platform.OS === 'osx') {
4444
UIManager.focus(textFieldID);
4545
} else if (Platform.OS === 'android') {
4646
UIManager.dispatchViewManagerCommand(

0 commit comments

Comments
 (0)