diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index bbfe97903e01..a9516d2164c0 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -161,6 +161,22 @@ + (void)supportLegacyViewManagerWithName:(NSString *)componentName #pragma mark - RCTComponentViewProtocol +// The legacy (Paper) view must fill the whole component view, as it did in Paper. +// Its children are laid out by Yoga relative to the outer frame (padding already applied), +// so placing the paper view at the content frame applies the padding twice. +- (void)setContentView:(UIView *)contentView +{ + [super setContentView:contentView]; + contentView.frame = self.bounds; +} + +- (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics + oldLayoutMetrics:(const LayoutMetrics &)oldLayoutMetrics +{ + [super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics]; + self.contentView.frame = self.bounds; +} + - (void)prepareForRecycle { _adapter = nil;