Skip to content

[Android] textDecorationLine underline disappears from an unchanged Text after a sibling is inserted (0.87.1) #58999

Open

Description

@ChoiHyeongu

Description

On Android, an underline set with textDecorationLine: 'underline' disappears from a <Text> whose own props and position did not change, once its parent commits a layout change around it (here: sibling rows inserted after it). The text still renders; only the decoration is gone. Newly mounted Text views, and Text views that moved, keep the underline. iOS is not affected.

It happens for both nested (<Text>a <Text style={{textDecorationLine: 'underline'}}>b</Text></Text>) and standalone underlined Text.

In 0.87 Android underline drawing moved from the framework UnderlineSpan to ReactUnderlineSpan (a CanvasEffectSpan painted from ReactTextView.onDraw → drawTextEffects → drawSpannedDecoration), as part of the textDecorationStyle work (87184c8). The symptom looks like that path draws nothing when an existing ReactTextView is only redrawn.

Possibly related, but different symptoms: #57900 (decoration position), #58356 (crash with numberOfLines).

We first saw it in an app where, among many identically styled rows, only some kept their underline — the ones that happened to be re-laid-out in the same commit.

Steps to reproduce

  1. Clone https://github.com/ChoiHyeongu/rn-087-android-underline-repro, then cd ReproducerApp && yarn install && yarn android.
  2. On launch, every row is underlined.
  3. Tap INSERT. Eight k rows are inserted between the n rows and the s rows.
  4. Every n row (unchanged, above the insertion) loses its underline. The inserted k rows and the shifted s rows keep it.

RERENDER (parent state change only) and REMOUNT (key change) do not trigger it.

React Native Version

0.87.1

Affected Platforms

Runtime - Android

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

System:
  OS: macOS 26.5
  CPU: (14) arm64 Apple M4 Pro
  Memory: 3.49 GB / 48.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.14.0
    path: ~/.local/share/mise/installs/node/24.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.local/share/mise/installs/node/24.14.0/bin/yarn
  npm:
    version: 11.9.0
    path: ~/.local/share/mise/installs/node/24.14.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.5
      - iOS 26.5
      - macOS 26.5
      - tvOS 26.5
      - visionOS 26.5
      - watchOS 26.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.32098.37.2534.15336583
  Xcode:
    version: 26.6/17F113
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 23.0.2
    path: /usr/bin/javac
  Ruby:
    version: 3.4.2
    path: ~/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: 20.2.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.87.1
    wanted: 0.87.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

No crash and no warnings — visual-only. The underline is simply not drawn.

MANDATORY Reproducer

https://github.com/ChoiHyeongu/rn-087-android-underline-repro

Screenshots and Videos

Pixel 9 Pro emulator, Android 16 (API 36).

Before After tapping INSERT

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions