1. #1
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    102
    Vote Rating
    6
    touchy is on a distinguished road

      0  

    Default Direct submit of form with file upload works in Chrome but not in FF or IE

    Direct submit of form with file upload works in Chrome but not in FF or IE


    Is there a known gotcha?

    Working on Ext JS 4.2.2 app (Sencha Architect 3.0.1) using Ext Direct and it works fine in Chrome. Most things (including forms and remote calls using Ext Direct) work in Firefox (tried Linux, Windows), but that one form with Ext Direct file upload doesn't.

    No request seems to be sent: No request seen in Firebug, no request seen on server.

    I see this perfectly running in Chrome. That tells me I'm not completely off.

    I followed it way into the submit / direct submit code. In Internet Explorer 10 debugger I get to class Ext.data.Connection method upload: where it creates an iframe with about:blank and then calls form.submit(). I tried it both leaving my relative url, and then an absolute URL. Same server as web page, same port.

    Any known points to watch out for?

  2. #2
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    102
    Vote Rating
    6
    touchy is on a distinguished road

      1  

    Default cause identified and workaround

    cause identified and workaround


    A workaround for my (any) app to work is to preemptively in the submitting controller action call

    Code:
    if (typeof form.api.submit != 'function') {
        form.api.submit = Ext.direct.Manager.parseMethod(form.api.submit);
    }
    before calling form.submit so it never meets a certain condition in doSubmit and never maims the form element it apparently needs to be in the body for the form submit to work.

    As analyzed with Ext JS 4.2.2:

    The problem has been caused by class Ext.form.action.DirectSubmit method doSubmit.

    Specifically under some circumstances it would meet condition

    Code:
    if (typeof fn !== 'function')
    Then after

    Code:
    api.submit = fn = Ext.direct.Manager.parseMethod(fn);
    it would call

    Code:
    me.cleanup(formInfo);
    The problem with that is that cleanup is only supposed to be called at the very end of the doSubmit. E.g. it disconnects the form from body. I've not analyzed what other things it does, but that apparently has caused the problem.

  3. #3
    Sencha - Ext JS Dev Team
    Join Date
    Jun 2011
    Location
    San Diego, CA
    Posts
    174
    Vote Rating
    33
    nohuhu has a spectacular aura about nohuhu has a spectacular aura about

      1  

    Default


    touchy,

    Thanks for finding this bug, it's been taken care of and the fix should appear in 4.2.3.

    Regards,
    Alex.

  4. #4
    Sencha User
    Join Date
    Apr 2010
    Location
    Bologna, Italy
    Posts
    35
    Vote Rating
    1
    dcima is on a distinguished road

      0  

    Default


    Quote Originally Posted by touchy View Post
    A workaround for my (any) app to work is to preemptively in the submitting controller action call
    Confirmed: your workaround works perfectly.

    Thanks!

  5. #5
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    284
    Vote Rating
    1
    Stju is on a distinguished road

      0  

    Default This is fixed as part of upcoming 4.2.3 release

    This is fixed as part of upcoming 4.2.3 release


    This is fixed as part of upcoming 4.2.3 release

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar