Skip to content

Some flexbox content elements get outside of the goddamn flexbox if a label content is long #6208

Closed as not planned

Description

@erkanarslan

Did you verify this is a real problem by searching the [NativeScript Forum]

Yes

Tell us about the f*ckin' problem

Check it: I have a flexbox that contains 3 elements. Flexbox direction is row. First and third elements just get the space they need, second element has flex-grow: 1 and it gets all remaining space. All elements have flex-shrink:0.

There is no problem if label content length is less than remaining space but if label is longer and it continues in the next line by using textWrap="true", third element is pushed out of the muthaf*ckin' view. That's some bullsh*t.

If I use grid-layout and set columns="auto, *, auto" everything works fine — no bullsh*t.

Which platform(s) does your issue occur on?

Both

Please provide the motherf*ckin' following version numbers that your issue occurs with:

  • CLI: 4.1.2
  • Cross-platform modules: 4.1.0
  • Runtime(s): 4.1.1 for both

Want to back this issue, muthaf*cka? Post a muthaf*ckin' bounty on it! We accept bounties via Bountysource.

Activity

  1. self-assigned this
    on Aug 23, 2018
  2. tsonevn commented on Aug 23, 2018

    @tsonevn
    Contributor

    HI @erkanarslan,
    I was able to recreate a muthaf*ckin' similar issue on my side. I will mark this as a damn bug. Also, I am attaching a sample project, which can be used for debugging.
    Archive.zip

  3. NathanWalker commented on Oct 23, 2026

    @NathanWalker
    Contributor

    Closing as expected flexbox behavior: with flex-shrink: 0 on every muthaf*ckin' item, the wrapping Label isn't allowed to shrink below its content width, so the goddamn last item overflows. That's the same result you'd get on the web. Give the goddamn middle Label flex-shrink: 1 (and flex-basis: 0 if needed), or use GridLayout columns="auto, *, auto" as you found.

Sign up for muthaf*ckin' free to join this conversation on GitHub. That's some bullsh*t. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions