Thank you for reporting this bug. We will make it our priority to review this report.
api.submit can't be a string using Firefox in Ext.form.action.DirectSubmit
api.submit can't be a string using Firefox in Ext.form.action.DirectSubmit
There's a bug when using Ext.direct with Form if api.submit is a string instead of a function.
On Mozilla Firefox, if api.submit is a string, the first submit just do nothing (internally it resolves the function but not call it) and the second submit works
if api.submit is a function, it works.On Google Chrome, it always works even if api.submit is a string or a function.
I "solved" the bug by removing the line "me.cleanup(formInfo);" in Ext.form.action.DirectSubmit
Code:
Ext.override(Ext.form.action.DirectSubmit, {
extend:'Ext.form.action.Submit',
requires: ['Ext.direct.Manager'],
alternateClassName: 'Ext.form.Action.DirectSubmit',
alias: 'formaction.directsubmit',
type: 'directsubmit',
doSubmit: function() {
var me = this,
form = me.form,
api = form.api,
fn = api.submit,
callback = Ext.Function.bind(me.onComplete, me),
formInfo = me.buildForm(),
options;
if (typeof fn !== 'function') {
//<debug>
var fnName = fn;
//</debug>
api.submit = fn = Ext.direct.Manager.parseMethod(fn);
// me.cleanup(formInfo);
//<debug>
if (!Ext.isFunction(fn)) {
Ext.Error.raise('Cannot resolve Ext.Direct API method ' + fnName);
}
//</debug>
}
if (me.timeout || form.timeout) {
options = {
timeout: me.timeout * 1000 || form.timeout * 1000
};
}
fn.call(window, formInfo.formEl, callback, me, options);
me.cleanup(formInfo);
},
// Direct actions have already been processed and therefore
// we can directly set the result; Direct Actions do not have
// a this.response property.
processResponse: function(result) {
return (this.result = result);
},
onComplete: function(data, response){
if (data) {
this.onSuccess(data);
} else {
this.onFailure(null);
}
}
});
jeudi 17 avril 2014
api.submit can't be a string using Firefox in Ext.form.action.DirectSubmit
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire