innostudio / fileuploader

Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
141 stars 25 forks source link

Cropper broken on latest Chrome version (84) #62

Open lander16 opened 4 years ago

lander16 commented 4 years ago

I just updated to version 84 of Chrome and the cropper is broken when I open it on the onFileRead callback, I do this:

onFileRead: function (item, listEl, parentEl, newInputEl, inputEl) {
            item.popup.open();
            if (item.editor) {
                item.editor.cropper();
            } else {
                console.log('no cropper')
            }
        }

This worked fine until this update, now the cropper opens but it doesn't match the background image, it shows like in the image below:

Screenshot 2020-07-22 at 11 00 17

Any guidance on this issue?

Thanks

lander16 commented 4 years ago

Forgot to mention that if I don't do item.editor.cropper(); and then open it clicking the button, it works fine.

lander16 commented 4 years ago

Seems to have to do with positioning of the image, trying the client side example in Chrome 84 vs Safari I see:

Safari:

sc

Chrome

chrome

Hope this helps.

innostudio commented 4 years ago

Working... There is something with display: flex, the popup will need to be written again, because the old logic doesn't work anymore for Chrome 84

innostudio commented 4 years ago

@lander16 a really quick solution that works on Chrome 84, Windows, is:

.fileuploader-popup .fileuploader-popup-node {
    flex-direction: row;
}

I will to investigate what was changed in the new version and I why changing the direction is so important. I will get back with updates.

lander16 commented 4 years ago

@innostudio Thanks, that does work, looking forward to your comments on this.

localota-travel commented 3 years ago

I am getting this problem on the most recent version and the flex-direction suggestion does not work for me. If I close the editor and then re-open it on the same file (without re-uploading), the problem resolves itself and can be used properly.

Is there another workaround for this or a fix coming?