Skip to content

[Fabric] Fix clipping on nested Views inside a text #14443

Open

Description

Summary

Clipping doesn't work for nested Views inside a text. The first view will be clipped correctly but any view inside of it will stay it's original width/height

Example Code

Can see that in RNTester that the Red View will be clipped correctly but the steelblue view won't

      <RNTesterText
        style={{
          overflow: 'hidden',
          width: 150,
          height: 75,
          backgroundColor: 'lightgrey',
        }}>
        This is an inline view
        {/* Render a red border around the steelblue rectangle to make it clear how the inline view is being clipped */}
        <View style={{width: 50, height: 100, backgroundColor: 'red'}}>
          <View
            style={{
              width: 48,
              height: 98,
              left: 1,
              top: 1,
              backgroundColor: 'steelblue',
            }}
          />
        </View>
      </RNTesterText>

Basic Example

Playground-composition_41aTmIryJ1

Activity

  1. added
    Needs: Triage 🔍
    on Mar 20, 2025
  2. added
    Area: Fabric
    New Architecture
    Workstream: Component Parity
    on Mar 24, 2025
  3. chrisglein commented on Mar 24, 2025

    @chrisglein
    Member

    Tatiana Kapos (@TatianaKapos) Snippet of repro JS? Screenshot?

  4. TatianaKapos commented on Mar 25, 2025

    @TatianaKapos
    ContributorAuthor

    Sorry wrote this issue so I could link it in the initial PR, add screenshots and examples!

  5. removed
    Needs: Triage 🔍
    on Mar 27, 2025
  6. added this to the Next milestone on Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: FabricArea: LayoutArea: TextNew ArchitectureWorkstream: Component Parityenhancement

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions