Index: branches/wmf/1.19wmf1/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 ) { |
Property changes on: branches/wmf/1.19wmf1/extensions/ApiSandbox/ext.apiSandbox.js |
___________________________________________________________________ |
Added: svn:mergeinfo |
609 | 616 | Merged /branches/new-installer/phase3/extensions/ApiSandbox/ext.apiSandbox.js:r43664-66004 |
610 | 617 | Merged /branches/JSTesting/extensions/ApiSandbox/ext.apiSandbox.js:r100352-107913 |
611 | 618 | Merged /branches/REL1_15/phase3/extensions/ApiSandbox/ext.apiSandbox.js:r51646 |
612 | 619 | Merged /branches/wmf/1.18wmf1/extensions/ApiSandbox/ext.apiSandbox.js:r97508 |
613 | 620 | Merged /branches/REL1_17/phase3/extensions/ApiSandbox/ext.apiSandbox.js:r81445,81448 |
614 | 621 | Merged /trunk/extensions/ApiSandbox/ext.apiSandbox.js:r111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112114,112153,112160,112166,112260,112282,112360,112517,112571,112613,112628,112721 |
615 | 622 | Merged /branches/sqlite/extensions/ApiSandbox/ext.apiSandbox.js:r58211-58321 |
616 | 623 | Merged /trunk/phase3/extensions/ApiSandbox/ext.apiSandbox.js:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |