Fix import button events

Change-Id: Iecb6e663cdf2cc53f6053a21707aff1ff2911181
This commit is contained in:
Ed Sanders 2018-07-14 10:20:11 +01:00 committed by Esanders
parent cb6d98b1f4
commit fbb8837a88

View file

@ -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 ) {