React-native: Margin affects padding inside button (0.54.2) sdk 26

Created on 18 Apr 2018  路  22Comments  路  Source: facebook/react-native

Environment:
OS: OS X El Capitan 10.11.6
Node: 8.4.0
Yarn: 1.3.2
npm: 4.6.1
Watchman: 4.7.0
Xcode: Xcode 8.2.1 Build version 8C1002
Android Studio: 2.2 AI-145.3537739

Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz => 0.54.2

Steps to Reproduce
1 - uncomment marginTop

Expected Behavior

  • Text inside button should be centralized

Actual Behavior

  • Text is moved on top of the button

Reproducible Demo
https://snack.expo.io/SJhhndX3G

This is happening after updating to React native 0.54.2

Bug Android

Most helpful comment

@garronej Version 0.61.5 and still happening

All 22 comments

I created issue on expo board first. They pointed to several commits in React Native repo.

https://github.com/expo/expo/issues/1667#issuecomment-382159045

Only Happens with margin declared with a percentage and it stills happens in react-native v0.55.3

19164

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

I just verified that this issue is still present in v0.57.0.

I also still have this issue.

This is not just an Android issue; as the erroneously-closed #19164 indicates. I'm experiencing it as well on iOS.

This only appears to apply for percentage margins, not integer margins:
https://snack.expo.io/Byj4wSvhQ

I was still able to reproduce this on react-native 0.59.1.

Is there somebody who'd like to send a PR with a fix for this issue?

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

This is still an issue, as the Snack I linked above demonstrates.

EDIT: forgot to update Expo SDK version (and thus React Native version). Retesting...

Just tested it again with Expo SDK 32 and 34. Same (still broken) behavior in both (tested iOS).

Interestingly, the behavior is correct in expo-web.

Still broken

Still broken!

I can't understand why this is still in the same state without a single higher up reckon this issue or give some info about it!
:/

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Is it fixed now?

@garronej Version 0.61.5 and still happening

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale It hasn't been fixed, please leave it open.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale very much not fixed 馃槝

Sent with GitHawk

Was this page helpful?
0 / 5 - 0 ratings