mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Fix import button events
Change-Id: Iecb6e663cdf2cc53f6053a21707aff1ff2911181
This commit is contained in:
parent
cb6d98b1f4
commit
fbb8837a88
|
@ -126,7 +126,7 @@
|
|||
onNameChange();
|
||||
|
||||
function onImportChange() {
|
||||
documentNameInput.getValidity().then( function () {
|
||||
importInput.getValidity().then( function () {
|
||||
importButton.setDisabled( false );
|
||||
}, function () {
|
||||
importButton.setDisabled( true );
|
||||
|
@ -149,9 +149,9 @@
|
|||
// TODO: Check page exists?
|
||||
return !!mw.Title.newFromText( value );
|
||||
} );
|
||||
importInput.on( 'change', onImportChange );
|
||||
importInput.on( 'enter', importTitle );
|
||||
importButton.on( 'click', importTitle );
|
||||
importButton.setDisabled( false );
|
||||
onImportChange();
|
||||
|
||||
if ( pageTitle ) {
|
||||
|
|
Loading…
Reference in a new issue