Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms plugin is breaking after Chrome 83 update #573

Closed
krishnan-unni opened this issue May 27, 2020 · 4 comments
Closed

Forms plugin is breaking after Chrome 83 update #573

krishnan-unni opened this issue May 27, 2020 · 4 comments

Comments

@krishnan-unni
Copy link

krishnan-unni commented May 27, 2020

Description:

I am facing issues with the plugin after updating to Chrome 83. Previously during a file upload operation there is a iframe attached to the document and then the serialized data is added to the <textarea> element in it, but after the update the textarea element is not present anymore and hence the parseJSON in the httpData is failing and throwing error.

It looks like the load callback (cb) function is called before the XHR request is complete that serialize the form data into json and updates the iframe that's created dynamically by the jQuery plugin. As a result the response is considered invalid.

In Chrome 83 the ready state is 'loading' when the callback is triggered.
Pre Chrome 83 the ready state is 'complete' when the callback is triggered.

var state = getDoc(io).readyState; in checkstate function is "loading" while for previous versions it was "completed".

Expected Behavior:

File should upload properly.

Actual behavior:

Getting error : "SyntaxError: Unexpected end of JSON input"
since serialized data =""

Versions:

4.2.2

jQuery:
jquery-3.4.1

Browsers:
All chrome browser with version 83

Steps to reproduce:

Create a form with jquery form to upload a file. iframe should have src = "javascrip:false" . When you select the file to upload and click OK you'll get the error. "SyntaxError: Unexpected end of JSON input"

@mcdruid
Copy link

mcdruid commented May 28, 2020

Sounds like it's probably the same as #571 ?

@krishnan-unni
Copy link
Author

I saw the description and actual behaviour for #571 is different from mine. I didn't want to muddle that, hence raised a new one with details. If we find both to be the same we can close this.

@kevindb
Copy link
Contributor

kevindb commented Jun 7, 2020

@krishnan-unni Would you please confirm if your issue is Fixed by #572 ?

@krishnan-unni
Copy link
Author

It is. Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants