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

[iOS] Keep placeholder attributes sync with text input text's attributes #23738

Closed

Conversation

zhongwuzw
Copy link
Contributor

Summary

We need to keep placeholder attributes sync with text input's text attributes, like font,kern ....., to keep style the same.

Also fixes #19002 .

Changelog

[iOS] [Fixed] - Keep placeholder attributes sync with text input text's attributes

Test Plan

When text input has style attributes like letterSpacing,font, they also applied to placeholder text attributes.

        <TextInput
  style={{ letterSpacing: 10 }}
  placeholder="I will not respect letterSpacing value on iOS, I will not respect letterSpacing value on iOS"
  multiline={true}

image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 4, 2019
[iOS] Keep placeholder attributes sync with text input text's attributes

Add nil check for placeholder
@zhongwuzw zhongwuzw force-pushed the add_letterSpacing_placeholder branch from bcb255a to 37445f2 Compare March 4, 2019 02:12
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Mar 4, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @zhongwuzw in 65c014d.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added Merged This PR has been merged. and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Mar 4, 2019
facebook-github-bot pushed a commit that referenced this pull request Mar 5, 2019
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed multiline text input placeholder size
Pull Request resolved: #23742

Differential Revision: D14320489

Pulled By: cpojer

fbshipit-source-id: 6b0f07fe7406d5c99c7280d584f8b8e51fc84c00
facebook-github-bot pushed a commit that referenced this pull request Mar 5, 2019
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed singleline text input placeholder size
Pull Request resolved: #23745

Differential Revision: D14320630

Pulled By: cpojer

fbshipit-source-id: 2d9e8b59ba70228202add762cfc9c6cbc77e5e95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

letterSpacing does not work on placeholder on iOS
4 participants