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

TouchableHighlight does not return to its backgroundColor after press #156

Closed
ColinEberhardt opened this issue Mar 16, 2015 · 3 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ColinEberhardt
Copy link

The following defines a component with a TouchableHighlight that has a red background. When pressed the underlayColor is applied, however when the press is released it returns to a white background color. I would expect it to return to its original state, with a red background.

'use strict';

var React = require('react-native/addons');

var {
  AppRegistry,
  Text,
  StyleSheet,
  TouchableHighlight
} = React;

var styles = StyleSheet.create({
  buttonText: {
    fontSize: 18,
    color: 'black',
    alignSelf: 'center'
  },
  button: {
    height: 36,
    width: 100,
    flexDirection: 'row',
    backgroundColor: 'red',
    borderColor: '#48BBEC',
    margin: 20,
    justifyContent: 'center'
  },
});

var UIExplorerApp = React.createClass({
  render: function() {
    return (
      <TouchableHighlight style={styles.button}
          underlayColor='#99d9f4'>
        <Text style={styles.buttonText}>Go</Text>
      </TouchableHighlight>
    );
  }
});

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

module.exports = UIExplorerApp;
@ide
Copy link
Contributor

ide commented Mar 18, 2015

#129 should fix this.

@ColinEberhardt
Copy link
Author

Thanks @ide - just tested your code and confirm that it fixes this issue.

@ColinEberhardt
Copy link
Author

Fixed by 06a87be

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants