https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112734
Revision: 112734
Author: krinkle
Date: 2012-02-29 22:19:16 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
[ApiSandbox] Remove redundant click-handler
* The default behavior for <button type="submit"> is to trigger submission of
the closest <form> ancestor. No point in preventing that from happening only to
trigger it again.
* No change in behavior, just removal of redundant code
* Follows-up r112721
Modified Paths:
--------------
trunk/extensions/ApiSandbox/ext.apiSandbox.js
Modified: trunk/extensions/ApiSandbox/ext.apiSandbox.js
===================================================================
--- trunk/extensions/ApiSandbox/ext.apiSandbox.js 2012-02-29 22:02:03 UTC
(rev 112733)
+++ trunk/extensions/ApiSandbox/ext.apiSandbox.js 2012-02-29 22:19:16 UTC
(rev 112734)
@@ -515,13 +515,6 @@
$submit = $submit.clone( /*dataAndEvents=*/true, /*deep=*/true )
.appendTo( '#api-sandbox-parameters' )
.add( $submit )
- .click( function ( e ) {
- // Don't do default action (crawl up to <form>
and trigger a submit).
- // That would submit it twice (bug 34790)
- e.preventDefault();
-
- $form.submit();
- } )
.button({ disabled: true });
$examplesButton = $( '<button>' )
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs