Skip to content

Bug: <title> in <Activity> sets the title when "mode=hidden" #34738

@nilshartmann

Description

@nilshartmann

React version: 19.2

Steps To Reproduce

  1. Add two (or more) components wrapped in Activity
  2. Add a <title> component to each component wrapped in Activity
  3. The browser title does not change if you switch an Activity from hidden to visible

Link to code example: https://github.com/nilshartmann/react-activity-title

The current behavior

  • The last (?) rendered components sets the title with no respect to surrounding Activity
  • In the screenshot below <Activity mode="visible"> renders a component that itself renders <title>two</title>, but actually the tab title is set to three (rendered by a <title>-component inside a child component of <Activity mode="hidden">)
Image

The expected behavior

  • Only the <title> in the <Activity mode="visible"> component should affect the browser title
  • or it should be documented somewhere that the current behaviour is working as expected

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