reflex icon indicating copy to clipboard operation
reflex copied to clipboard

[REF-3296] Paste handler should paste in only the file object and not the path

Open dentroai opened this issue 1 year ago β€’ 3 comments

Describe the bug When using the new paste handler, I can't set up the event handler so that if a file is pasted we only handle the file but do not paste in the file path as text into the input field / text area.

When I use prevent_default the file path isn't displayed when I paste a file, but then I also can't paste in normal text. If I don't use prevent_default, the file path is always pasted in along

Expected behavior If a file is pasted, the paste handler should paste in only the file object and not the path as text in the input field. If plain text is pasted, do paste it in the input field.

Specifics (please complete the following information):

  • Python Version: 3.12
  • Reflex Version: 0.5.6

Additional context Conversation already started here: https://github.com/reflex-dev/reflex/pull/3513

REF-3296

dentroai avatar Jul 11 '24 19:07 dentroai

HI, I would like to work on this issue. Can you please assign this to me?

us107 avatar Oct 15 '24 04:10 us107

@us107 just assigned you!

picklelo avatar Oct 15 '24 16:10 picklelo

I have reviewed the code and think the issue seems to be related to the paste.js file. I will be working on this file to resolve the issue. Please let me know if there are any other files I should consider.

us107 avatar Oct 15 '24 18:10 us107