jenkins-bot has submitted this change and it was merged.
Change subject: Disable input field on lookup, too
......................................................................
Disable input field on lookup, too
The lookup action is bound to the lookup input field, too (on key return),
so an user could submit the form twice (press return twice or click generate
button and press return), which would trigger an error message. To avoid that,
disable the input field, too, while the lookup processed.
Bug: T116471
Change-Id: I021c60094331d8816f20d3739f12726ce3df217a
---
M modules/ve.ui.CiteFromIdInspector.js
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
Esanders: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve.ui.CiteFromIdInspector.js
b/modules/ve.ui.CiteFromIdInspector.js
index ee4785c..aedb5ea 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -501,7 +501,7 @@
}
// Set as pending
this.lookupButton.setDisabled( true );
- this.lookupInput.pushPending();
+ this.lookupInput.setDisabled( true ).pushPending();
// We have to first set up a get response so we can have
// a proper xhr object with "abort" method, so we can
@@ -537,7 +537,12 @@
return $.Deferred().resolve();
} )
.always( function () {
- inspector.lookupInput.popPending();
+ inspector
+ .lookupInput
+ .setDisabled( false )
+ // restore focus to the input field
+ .focus()
+ .popPending();
inspector.lookupButton.setDisabled( false );
} )
.promise( { abort: xhr.abort } );
--
To view, visit https://gerrit.wikimedia.org/r/248616
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I021c60094331d8816f20d3739f12726ce3df217a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits