mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-15 03:23:45 +00:00
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:
parent
b3a8507515
commit
c09b7f5b78
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue