Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -516,6 +516,10 @@ |
517 | 517 | .appendTo( '#api-sandbox-parameters' ) |
518 | 518 | .add( $submit ) |
519 | 519 | .click( function ( e ) { |
| 520 | + // Don't do default action (crawl up to <form> and trigger a submit). |
| 521 | + // That would submit it twice (bug 34790) |
| 522 | + e.preventDefault(); |
| 523 | + |
520 | 524 | $form.submit(); |
521 | 525 | } ) |
522 | 526 | .button({ disabled: true }); |
— | — | @@ -602,6 +606,9 @@ |
603 | 607 | $form.submit( function ( e ) { |
604 | 608 | var url, params, mustBePosted; |
605 | 609 | |
| 610 | + // Prevent browser from submitting the form |
| 611 | + // and reloading the page to the action-url. |
| 612 | + // We're doing it with AJAX instead, below. |
606 | 613 | e.preventDefault(); |
607 | 614 | |
608 | 615 | if ( $submit.button( 'option', 'disabled' ) === true ) { |
— | — | @@ -623,6 +630,7 @@ |
624 | 631 | } |
625 | 632 | |
626 | 633 | showLoading( $output ); |
| 634 | + |
627 | 635 | if ( mustBePosted ) { |
628 | 636 | $requestUrl.val( url ); |
629 | 637 | if ( params.length > 0 ) { |
Property changes on: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
___________________________________________________________________ |
Deleted: svn:eol-style |
630 | 638 | - native |
Property changes on: trunk/extensions/ApiSandbox/ext.apiSandbox.css |
___________________________________________________________________ |
Deleted: svn:eol-style |
631 | 639 | - native |