next-cloudinary icon indicating copy to clipboard operation
next-cloudinary copied to clipboard

After uploading image the page is stucked, unable to scroll it

Open juddin0802 opened this issue 10 months ago • 11 comments

After uploading image the page is stucked, unable to scroll it, any solution for it please?

Also is there a way in next js to update/ replace the old image with new one and also send the updated image URL to DB? currenctly I am just trying to send new updated image URL to DB but not working

juddin0802 avatar Apr 23 '24 17:04 juddin0802

when you say after uploading, can you help identify exactly when after? is this before a callback is fired, after a callback is fired, is this after you set state, etc. do you have a code example?

you're able to replace old images using Cloudinary, but tricky using the Upload Widget. one potential example that i didnt try is using the upload preset to turn on using the filename and having overwrite on, so that when uploading the same filename twice, i would expect it to replace instead of re-upload?

image

the tricky part is that your uploads need to have the same public ID

colbyfayock avatar May 06 '24 20:05 colbyfayock

I have the same issue i think after i setState

Poise-Paul avatar Jul 26 '24 17:07 Poise-Paul

We're having the same issue too - here's the testing flow to recreate:

  • upload a file using <CldUploadWidget /> with autoMinimize={true) in options
  • once the smaller cloudinary progress modal appears in the bottom right, open it up again (un-minimizing it)
  • the cloudinary modal disappears once complete, and the fileUrl etc feeds into the state successfully
  • now can't scroll the page

My guess is there's faulty logic somewhere that's pushing overflow-hidden into

or
or something! Going to try recreating it without using autoMinimize. I'll edit this with an update.

andrewsmithdesign avatar Aug 02 '24 00:08 andrewsmithdesign

i keep hitting this at times too but haven't had a way to reproduce

i'll work through reproducing with those steps and I'm curious if this is a component issue or an underlaying Upload Widget issue, so will attempt to reproduce with a vanilla installation of the Upload Widget

thanks for the additional info everyone

Edit: i can't reproduce with the autominimize steps unfortunately...

colbyfayock avatar Aug 02 '24 18:08 colbyfayock

Thanks for getting back so fast! I'll have a look for some faulty modal overflow-hidden logic on our end. Challenging to debug!

andrewsmithdesign avatar Aug 04 '24 23:08 andrewsmithdesign

just to be clear i think it is an issue with the component, it's happened to me at times too, i just haven't been able to get it to happen when i have visibility into what's going on or regularly reproduce it so that i can work on debugging it.

the challenging thing is being able to determine if it's CldUploadWidget or if it's the underlaying Upload Widget script that this is a wrapper around

i suspect its related to the Upload Widget though given what's going on with the overflow. im trying to see if anyone internally has hit this issue to try to find leads, in the meantime if anyone is able to get reproducible steps please let me know as those weren't working for me :(

colbyfayock avatar Aug 04 '24 23:08 colbyfayock

I had this same issue, and what worked for me (although Im not clear why) was popping the close() function into the onSuccess param in the CldUploadWidget.

Something like: onSuccess={(result, { close }) => { updateState(result); close(); }}

Again, this is just what worked for me, but figured I'd share in case it helps unblock someone.

stephen-leisy avatar Aug 08 '24 18:08 stephen-leisy

thanks @stephen-leisy - were you able to regularly reproduce it prior to that fix? are you able to share the code you had to reproduce it if so?

colbyfayock avatar Aug 08 '24 18:08 colbyfayock

@colbyfayock I can't currently because its in a private work repo, but I'll try and reproduce it in a sandbox and share.

stephen-leisy avatar Aug 08 '24 18:08 stephen-leisy

@stephen-leisy That fix is not working for me .., page is still stuck

Poise-Paul avatar Aug 18 '24 19:08 Poise-Paul

@Poise-Paul are you able to regularly reproduce this? are you able to share the code, create a reproduction, or explain how to do so? really would love to get this fixed but haven't been able to find anyone that can reproduce or regularly so

colbyfayock avatar Aug 18 '24 23:08 colbyfayock

@stephen-leisy You saved my ASS🤧🤧. Thanks buddy.

evansosei0707 avatar Oct 06 '24 12:10 evansosei0707

@evansosei0707 were you able to regularly reproduce this?

colbyfayock avatar Oct 07 '24 12:10 colbyfayock