You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ill show the problem first, and then describe it.
correct:
buggy:
i have a sidebar that is absolutely positioned. inside that sidebar i have one view, that has flex: 1, and its yellow. it covers the whole space.
inside that yellow view, i have one text view, that also has flex: 1, has some text, and pink background.
using the toggle button, i can hide and show the sidebar.
here is the problem. in the buggy case, i use the left style, so it moves between -40 and 0, so with -40 its hidden, and with 0 its shown. every time i show/hide the sidebar, the pink text view is getting weirdly resized, without me doing anything in code. the same bug happens with a simple view instead of the text.
the correct case is exactly the same, but has left: 0, and translate:[{transformX: <val>}] is the one having val go from -40 to 0.
from tests i did, if the left goes from 10 to 50, it works fine. so the problem lies in the left going negative.
somehow when there is an absolutely positioned view, with inside it a flex: 1 view, with inside that a view with flex: 1, and the outside-most view goes to negative left, the inside-most view gets resized.
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.
stalebot
added
the
Stale
There has been a lack of activity on this issue and it may be closed soon.
label
Dec 21, 2018
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Environment
Description
ill show the problem first, and then describe it.
correct:
buggy:
i have a sidebar that is absolutely positioned. inside that sidebar i have one view, that has
flex: 1
, and its yellow. it covers the whole space.inside that yellow view, i have one text view, that also has
flex: 1
, has some text, and pink background.using the
toggle
button, i can hide and show the sidebar.here is the problem. in the buggy case, i use the
left
style, so it moves between-40
and0
, so with-40
its hidden, and with0
its shown. every time i show/hide the sidebar, the pink text view is getting weirdly resized, without me doing anything in code. the same bug happens with a simple view instead of the text.the correct case is exactly the same, but has
left: 0
, andtranslate:[{transformX: <val>}]
is the one havingval
go from-40
to0
.from tests i did, if the
left
goes from10
to50
, it works fine. so the problem lies in theleft
going negative.somehow when there is an absolutely positioned view, with inside it a
flex: 1
view, with inside that a view withflex: 1
, and the outside-most view goes to negativeleft
, the inside-most view gets resized.Reproducible Demo
i put the project in that repo. its a basic crna app, with all the code in the
App.js
file. here is the repo:https://github.com/pvinis/bug-react-native
The text was updated successfully, but these errors were encountered: