Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/321874
Change subject: mw.UploadWizardLicenseInput: Use OOjs UI event handling for
custom textarea
......................................................................
mw.UploadWizardLicenseInput: Use OOjs UI event handling for custom textarea
The error messages will now be updated more reliably (e.g. on right
click paste).
Also lower the user input timeout from 2 seconds to 0.5 seconds, same
as we use elsewhere (e.g. DescriptionDetailsWidget).
Change-Id: Ifbf4727133f561903413cd639cf424d34c4d9791
---
M resources/mw.UploadWizardLicenseInput.js
1 file changed, 4 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard
refs/changes/74/321874/1
diff --git a/resources/mw.UploadWizardLicenseInput.js
b/resources/mw.UploadWizardLicenseInput.js
index 7a45823..bafad1d 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -319,15 +319,10 @@
} );
textarea.$input.attr( 'id', nameId );
- textarea.$input
- .focus( function () { input.setInput( $input,
true ); } )
- .keydown( function () {
- window.clearTimeout( keydownTimeout );
- keydownTimeout = window.setTimeout(
- function () { input.emit(
'change' ); },
- 2000
- );
- } );
+ // Select this radio when the user clicks on the text
field
+ textarea.$input.focus( function () { input.setInput(
$input, true ); } );
+ // Update displayed errors as the user is typing
+ textarea.on( 'change', OO.ui.debounce( this.emit.bind(
this, 'change' ), 500 ) );
button = new OO.ui.ButtonWidget( {
label: mw.message(
'mwe-upwiz-license-custom-preview' ).text(),
--
To view, visit https://gerrit.wikimedia.org/r/321874
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbf4727133f561903413cd639cf424d34c4d9791
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits