facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.33k stars 24.23k forks source link

Nesting an Image and a Text which has lineHeight in an Text will display wrong #17750

Closed JosephPoplar closed 6 years ago

JosephPoplar commented 6 years ago

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS High Sierra 10.13.2 Node: 8.9.1 Yarn: Not Found npm: 4.6.1 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0

Target Platform: iOS (11)

Steps to Reproduce

1.nest a Text with some text and an Image in a Text 2.give the nested Text a style with lineHeight 12 3.run the app

Expected Behavior

nest Text should render normal with lineHeight 12 , and there should be an Image below it.

rnbug-01

Actual Behavior

the Image was lost ,and the content of the nested Text render as one single line without line break.

rnbug-02

Reproducible Demo

https://snack.expo.io/@josephpoplar/reactnative-52-nesting-text-demo

Update

Environment

OS: macOS High Sierra 10.13.3 Node: 8.9.1 Yarn: Not Found npm: 4.6.1 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.53.3 => 0.53.3

Still error in 53.0.

Demo

ReactNativeTextDemo.zip please run npm install after opening the project.

react-native-bot commented 6 years ago

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

salmanwaheed commented 6 years ago

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a temporary error. The following address(es) deferred:

mkdirenv@gmail.com Domain salmanwaheed.info has exceeded the max emails per hour (156/150 (104%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------ Received: from o9.sgmail.github.com ([167.89.101.2]:5762) by box1177.bluehost.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from bounces+848413-a7b0-hello=salmanwaheed.info@sgmail.github.com) id 1epQUm-003InM-QL for hello@salmanwaheed.info; Fri, 23 Feb 2018 20:27:33 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=gG4tgLNC7bD5ghU3w8hC6VznP5k=; b=ae0QJXtFD4EohBdc LGSIbQKioBPyI8FvN03qK4Y5cWPfwCbv0iDloLiohm4Bhm7b6ohaXiFxmRZs9Z46 dIxYwKFEsboxRdlP9uxoMSncBrIN5bLy5DF05yyHVNZC431PNQ/YrBlwc7pfw5Gz MoVgWNBVzX6XYMofB7MeDbkGLjQ= Received: by filter0607p1iad2.sendgrid.net with SMTP id filter0607p1iad2-25817-5A90DB99-A 2018-02-24 03:27:21.935296654 +0000 UTC Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16]) by ismtpd0007p1iad2.sendgrid.net (SG) with ESMTP id gJENinluTyuzk1Kjhcb0QQ for hello@salmanwaheed.info; Sat, 24 Feb 2018 03:27:21.945 +0000 (UTC) Date: Sat, 24 Feb 2018 03:27:21 +0000 (UTC) From: React Native Bot notifications@github.com Reply-To: facebook/react-native reply@reply.github.com To: facebook/react-native react-native@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Message-ID: facebook/react-native/issue/17750/issue_event/1490267670@github.com In-Reply-To: facebook/react-native/issues/17750@github.com References: facebook/react-native/issues/17750@github.com Subject: Re: [facebook/react-native] Nesting an Image and a Text which has lineHeight in an Text will display wrong (#17750) Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_5a90daa8e7571_1d8a3fdff9b14f2c31843b"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: react-native-bot X-GitHub-Recipient: salmanwaheed X-GitHub-Reason: subscribed List-ID: facebook/react-native List-Archive: https://github.com/facebook/react-native List-Post: mailto:reply@reply.github.com List-Unsubscribe: mailto:unsub+00ef1b38a6a51298e2e3b31497325e3adc13275c1c98accf92cf0000000116a89ca892a169ce1164eac0@reply.github.com, https://github.com/notifications/unsubscribe/AO8bOCxnC-kjBfQ2Bdq9TGp1UWmQg1hnks5tX4CogaJpZM4Rt-aZ X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: hello@salmanwaheed.info X-SG-EID: 92ws1MVnlto3blxqXlf5goB0ee0kdDGWR6vcWx8d64+n5I+5w2G3dU4qc3w8i7wL1yb50M42m6K21y h+GVr/9g8IUvuzbLoMlBVOcuIPyPNKRfG+KCEPGGSMHMZXn1fX+lA1FRi/2BWVV4M+/KuuHQfZOBtC g3HtiCC7KhT/U0d5X5kfVd1JtDPAlan6pps8uvYIrr0tgz6zHsQ58eADr69JDhZI7EXHu0TlwpRhBo g= X-Spam-Status: No, score=-0.0 X-Spam-Score: 0 X-Spam-Bar: / X-Ham-Report: Spam detection software, running on the system "box1177.bluehost.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see root\@localhost for details.

Content preview: Closed #17750. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/facebook/react-native/issues/17750#event-1490267670 [...]

Content analysis details: (-0.0 points, 5.0 required)

pts rule name description


0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: github.com] -0.5 SPF_PASS SPF: sender matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 1.3 HTML_IMAGE_ONLY_24 BODY: HTML: images with 2000-2400 bytes of words 0.0 HTML_MESSAGE BODY: HTML included in message 2.5 DCC_CHECK No description available. -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [167.89.101.2 listed in wl.mailspike.net] -0.8 RCVD_IN_MSPIKE_WL Mailspike good senders -1.5 AWL AWL: Adjusted score from AWL reputation of From: address X-Spam-Flag: NO

----==_mimepart_5a90daa8e7571_1d8a3fdff9b14f2c31843b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #17750.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/facebook/react-native/issues/17750#event-1490267670 ----==_mimepart_5a90daa8e7571_1d8a3fdff9b14f2c31843b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #17750.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a90daa8e7571_1d8a3fdff9b14f2c31843b--

JosephPoplar commented 6 years ago

Still error in 53.0

junchenjun commented 6 years ago

Still happens in the latest version