Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput issues #255

Closed
vitvly opened this issue Jun 13, 2018 · 4 comments
Closed

TextInput issues #255

vitvly opened this issue Jun 13, 2018 · 4 comments
Assignees
Labels

Comments

@vitvly
Copy link

vitvly commented Jun 13, 2018

Below is a sample code that allows to reproduce a problem:

import React, {Component} from 'react';
import { AppRegistry, Modal, Text, TextInput, View, TouchableHighlight } from 'react-native';
import {
  Menu,
  MenuProvider,
  MenuOptions,
  MenuOption
} from 'react-native-popup-menu';
import MenuTrigger from 'react-native-popup-menu';
class rn_list extends Component {
  render () {
    return (
      <View>
      <Text>lots of text</Text>
           <TextInput placeholder='some text' style={{backgroundColor: '#00ff00', fontSize: 20}}/>
      </View>
);
  }
}

AppRegistry.registerComponent('rn_list', () => rn_list);

There are 3 issues visible, as compared to running in iOS Simulator:

  1. Background color setting is ignored.
  2. Font size setting is ignored.
  3. TextInput component is shifted to the right.
@vitvly vitvly changed the title backgroundColor not working for TextInput TextInput issues Jun 13, 2018
@vkjr vkjr added the bug label Jun 14, 2018
@vkjr vkjr self-assigned this Jun 17, 2018
@vkjr
Copy link
Contributor

vkjr commented Jun 17, 2018

@siphiuel, points 1 and 2 from this issue will be fixed now.
As for 3rd one, "TextInput component is shifted to the right.", it is not fully correct. TextInput component placed as it needs to be, but the text has left margin (qt sets this margin in style for mac platform). You can check it by setting borderWidth=1 in TextInput style.
screen shot 2018-06-17 at 4 27 41 pm

@vitvly
Copy link
Author

vitvly commented Jun 18, 2018

@vkjr thanks for clarification on #3. I've only compared with iOS simulator, did not know about macOS styling rules that apply here.

@vkjr
Copy link
Contributor

vkjr commented Jun 18, 2018

Just to clarify - those are styling of Qt for macOS and I'm not sure how they are aligned with macOS design guidelines :) But they look quite reasonable. We rarely have editboxes on desktop without margin.

@vkjr
Copy link
Contributor

vkjr commented Jun 18, 2018

Closing this one if you don't mind :)

@vkjr vkjr closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants