Skip to content

RefreshControl ignores style prop #51914

@plneple

Description

@plneple

Description

This is relevant to our project because we have a top section view that must maintain its background color during the ScrollView bounce effect. To achieve this, we layer an absolutely positioned view with the same background color beneath the ScrollView, and elevate the RefreshControl above it using zIndex. This approach works as expected in the old architecture, but it no longer functions correctly after upgrading to the new architecture.

The issue is resolved with the following patch, which addresses the zIndex behavior specifically
patch.patch

Steps to reproduce

  1. Open the Snack
  2. RefreshControl is under the view

React Native Version

0.79.3

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.5
  CPU: (10) arm64 Apple M4
  Memory: 156.75 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: ~/.nvm/versions/node/v20.17.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.17.0/bin/yarn
  npm:
    version: 11.2.0
    path: ~/.nvm/versions/node/v20.17.0/bin/npm
  Watchman:
    version: 2025.02.17.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.25659.59.2432.13423653
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/u/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: 18.0.0
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.3
    wanted: 0.79.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

not relevant

MANDATORY Reproducer

https://snack.expo.dev/@lsbbdbxnzhsbdb/refreshcontrol-zindex-issue

Screenshots and Videos

https://github.com/user-attachments/assets/2fc991d6-5ba4-40c3-bb47-56eaeb74e88e
https://github.com/user-attachments/assets/7cfa800c-b4c7-415e-b315-f8df8ad5ad17

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions