vendredi 28 mars 2014

File upload in ajax does not grab iframe document (Sencha Touch 2.3.1)

In onUploadComplete in Connection.js line 482, it has:




Code:



doc = frame.contentWindow || frame.contentWindow.document || frame.contentDocument || window.frames[id].document;


This will grab the window, not the document sometimes.This causes responseText to not get set correctly, and the iframe won't get removed if you try to decode the responseText.



If you change it to:


Code:



doc = (frame.contentWindow && frame.contentWindow.document) || frame.contentDocument || window.frames[id].document;


it fixes the issue.




Aucun commentaire:

Enregistrer un commentaire