Ticket #6126: 6126.patch
File 6126.patch, 1.5 KB (added by , 13 years ago) |
---|
-
_source/core/editor.js
362 362 } 363 363 form.on( 'submit',onSubmit ); 364 364 365 // #6126 Browsers provide in the form.submit any input with name="submit" 366 // Let's rename them for a little while to get the original submit method 367 var submits = [], 368 node; 369 if( form.$.submit.length ) 370 { 371 // Don't do the full loop here. In IE works, but Firefox updates the collection 372 // and it's no longer an array when there's only one 373 for (var i = form.$.submit.length - 1; i > 0; i--) 374 { 375 node = form.$.submit[ i ]; 376 submits.push( node ); 377 node.name = 'ckeTmp'; 378 } 379 } 380 if ( form.$.submit.nodeName ) 381 { 382 node = form.$.submit; 383 submits.push( node ); 384 node.name = 'ckeTmp'; 385 } 386 365 387 // Setup the submit function because it doesn't fire the 366 388 // "submit" event. 367 if ( !form.$.submit.nodeName )389 if ( !form.$.submit.nodeName && !form.$.submit.length ) 368 390 { 369 391 form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) 370 392 { … … 382 404 }); 383 405 } 384 406 407 // Restore the "submit" name to the inputs 408 while ( node = submits.pop() ) 409 node.name = "submit"; 410 385 411 // Remove 'submit' events registered on form element before destroying.(#3988) 386 412 editor.on( 'destroy', function() 387 413 {