uploadcare / uploadcare-rails

Rails API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
https://uploadcare.com
MIT License
58 stars 70 forks source link

Duplicate button #134

Closed rockshell closed 7 months ago

rockshell commented 8 months ago

Passed on from general support

We on a Rails application (version 7.0.8) with the gem uploadcare-rails (version 3.3.4) and we're facing a strange behavior with the uploadcare_uploader_field helper :

When I hit the back button of the browser, the page is rendered and the Document buttons appears twice.

I can't figure out why. Do you have any idea?

image image

vipulnsward commented 8 months ago

I can reproduce this and it seems like a turbo loading/caching issue. Checking for possible resolutions or if this is something the widget should handle

vipulnsward commented 8 months ago

@rockshell can you confirm if turbo or rails ujs is being used on this page?

vipulnsward commented 7 months ago

Related bug- https://github.com/uploadcare/uploadcare-widget/issues/328#issuecomment-376139902

vipulnsward commented 7 months ago

Going to document the workaround on how others can handle this in their Apps for now