reflex icon indicating copy to clipboard operation
reflex copied to clipboard

rx.set_clipboard broken in 0.5.0

Open greenseeker opened this issue 1 year ago β€’ 4 comments

Describe the bug After updating to 0.5.0, rx.set_clipboard produces a runtime error.

To Reproduce Steps to reproduce the behavior:

def p_just_copy() -> rx.Component:
    return rx.button("copy", on_click=rx.set_clipboard("AAAAAAAAAAAAA"))

app = rx.App(
    theme=rx.theme(
        appearance="dark"
    )
)

app.add_page(p_just_copy, route="/")

Click the copy button to produce the error in the screenshot below.

Expected behavior Set clipboard content to the given text.

Screenshots image

Specifics (please complete the following information):

  • Python Version: 3.11.6
  • Reflex Version: 0.5.0
  • OS: Ubuntu 23.10
  • Browser (Optional): Brave 1.65.126, Firefox 125

greenseeker avatar May 15 '24 00:05 greenseeker

can you run reflex init and if that doesn't fix it, try deleting your .web folder and try again

ElijahAhianyo avatar May 15 '24 09:05 ElijahAhianyo

@ElijahAhianyo no change, unfortunately. Is there any logging that might help?

greenseeker avatar May 16 '24 00:05 greenseeker

@greenseeker what browser are you using? It's working on my Chrome and Safari. I wonder if this may be related.

picklelo avatar May 16 '24 01:05 picklelo

@picklelo reproduced in Brave 1.65.126 and Firefox 125

greenseeker avatar May 16 '24 21:05 greenseeker

Since updating to 0.5.1, I'm no longer having this issue.

greenseeker avatar May 27 '24 23:05 greenseeker

It worked for 2 days, but now getting the same error again, despite no changes to this code.

greenseeker avatar May 30 '24 00:05 greenseeker

Tested on 0.6.0, it's working so closing it.

Lendemor avatar Sep 24 '24 23:09 Lendemor