Define variable event

* Declare event as first function parameter.
* Move event.preventDefault() to the synchronous end of the function.

Change-Id: I813355088cbf215264dcccd474e97630915d63c5
This commit is contained in:
Fomafix 2015-06-27 21:12:24 +00:00 committed by TheDJ
parent b3a8507515
commit c09b7f5b78

View file

@ -89,7 +89,7 @@ $( function () {
} );
$save = $( '<button>' )
.text( mw.msg( 'savearticle' ) )
.click( function () {
.click( function ( event ) {
// horrible hack ;)
var src, tag, api = new mw.Api();
@ -103,8 +103,8 @@ $( function () {
setupEditor( $html );
closeEditor();
event.preventDefault();
} );
event.preventDefault();
} );
$cancel = $( '<button>' )
.text( 'Close' ).click( function ( event ) {