Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/90333
Change subject: Initialize the save dialog correctly even if the sanity check
failed
......................................................................
Initialize the save dialog correctly even if the sanity check failed
A very weird if statement caused pretty much all logic for displaying
the 'save' panel to be skipped if the sanity check had failed. The
result was that all buttons were displayed at the bottom of the
save dialog, even those that don't make sense in that context.
Change-Id: I628ebc05830fb25d67ff181852a1e56f0e25dee9
---
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
1 file changed, 13 insertions(+), 14 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/33/90333/1
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index ceb3fec..2b30912 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -211,21 +211,20 @@
case 'save':
if ( !this.sanityCheckVerified ) {
this.showMessage( 'dirtywarning', mw.msg(
'visualeditor-savedialog-warning-dirty' ) );
- } else {
- this.saveButton.$.show();
- this.reviewButton.$.show();
- this.reviewGoodButton.$.hide();
- this.resolveConflictButton.$.hide();
- setTimeout( function () {
- // fix input reference
- var $textarea =
dialog.editSummaryInput.$input;
- $textarea.focus();
- // If message has be pre-filled (e.g.
section edit), move cursor to end
- if ( $textarea.val() !== '' ) {
- ve.selectEnd( $textarea[0] );
- }
- } );
}
+ this.saveButton.$.show();
+ this.reviewButton.$.show();
+ this.reviewGoodButton.$.hide();
+ this.resolveConflictButton.$.hide();
+ setTimeout( function () {
+ // fix input reference
+ var $textarea = dialog.editSummaryInput.$input;
+ $textarea.focus();
+ // If message has be pre-filled (e.g. section
edit), move cursor to end
+ if ( $textarea.val() !== '' ) {
+ ve.selectEnd( $textarea[0] );
+ }
+ } );
break;
case 'conflict':
this.saveButton.$.hide();
--
To view, visit https://gerrit.wikimedia.org/r/90333
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I628ebc05830fb25d67ff181852a1e56f0e25dee9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits