Skip to content

rx.set_clipboard does not work properly on mobile device #6882

Description

@tim-haselhoff

Describe the bug
A clear and concise description of what the bug is.

The rx.set_clipboard event does not seem to work on my mobile device.

To Reproduce
Steps to reproduce the behavior:
Click the button in the example on mobile
text "Hello world" should be in the clipboard

  • Code/Link to Repo:
import reflex as rx


def index() -> rx.Component:
    return rx.el.div(
        rx.button(
            "Copy",
            on_click=[
                rx.set_clipboard("Hello world"),
                rx.toast.info("Copied to clipboard", duration=2000),
            ],
        ),
    )


app = rx.App()
app.add_page(index)

Expected behavior
A clear and concise description of what you expected to happen.

set_clipboard event also sets clipboard on mobile

Screenshots
If applicable, add screenshots to help explain your problem.

Specifics (please complete the following information):

  • Python Version: 3.14.6
  • Reflex Version: 0.9.8
  • OS: Linux on desktop, android 16
  • Browser (Optional):
    Tested on chrome and firefox

Additional context
Add any other context about the problem here.

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