YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528844 (closed defect)

Reporter


dexen
Opened: 03/15/10
Last modified: 04/8/10
Status: closed
Type: defect
Resolution: wontfix

Owner


Thomas S. Sha
Target Release:
Priority: P3 (normal)
Summary: premature resetFormState() breaks asynchronous file upload in Konqueror 4.x
Description:

When performing an asynchronous file upload, POST based, Connection Manager issues this.resetFormState() soon after this._formNode.submit().
Konqueror presents user with a confirmation dialog with list of files, and that occurs after the .submit() and .resetFormState() are executed. Subsequently, Konqueror uses reseted attributes of the
form for actual POST.
As a result, the `target` attribute, which pointed to iframe for handling the asynchronous file upload, is null by the time form submission is performed. The form, submitted with null target causes
content of the wole browser window to be replaced, rather than the iframe.

Type: defect Observed in Version: 2.8.0
Component: Connection Severity: S3 (normal)
Assigned To: Thomas S. Sha Target Release:
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers: Other
URL:
Test Information:

Konqueror 4.3.5 on Linux


<form action="/foo/bar" method="post" enctype="multipart/form-data" id="theform">
<input type="file" name="file"/>
<input type="submit"/>
</form>

<script>
var theForm = $('theform')
YEvent.addListener(theForm, 'submit', function(ev) {
YEvent.stopEvent(ev)
var callback = { upload: funciton() { alert('upload successfull') }, failure: function() { alert('upload failure') }, /* ... */ }
YAHOO.util.Connect.setForm(theForm, true)
var obj = YAHOO.util.Connect.asyncRequest('POST', theForm.action, callback) }
</script>

Expected result: alert dialog with `upload successfull`
Actual result: content of whole window is replaced by response to the POST request. No callback gets executed at all.

Change History

Thomas S. Sha

YUI Developer

Posted: 04/8/10
  • priority changed to P3 (normal)
  • resolution changed to wontfix
  • status changed from new to closed

The confirmation dialogue behaviour is distinctly different from the behaviour exhibited by browsers listed in the A-grade matrix. Specifically, the dialogue is not a blocking operation. No workaround will be implemented.