jenkins-bot has submitted this change and it was merged.
Change subject: Fix topic creation on mobile
......................................................................
Fix topic creation on mobile
There is code to only save the 'flow-editor' preference on-change
if the user's old preferred editor is available.
This means it won't get forced to 'wikitext' on mobile (where VE isn't
available). However, we should still emit the 'change' event,
since the meaning of the EditorSwitcherWidget 'change' event is:
"The contents of the editor changed."
This allows the topic creation button to un-disable.
Bug: T134060
Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
---
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
index 7971194..1edd1ff 100644
--- a/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
+++ b/modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
@@ -446,6 +446,8 @@
return;
}
+ this.emit( 'change' );
+
// Normalize 'none' to 'wikitext'
if ( currentPref === 'none' ) {
currentPref = 'wikitext';
@@ -467,8 +469,6 @@
// Ensure we also see that preference in the current
page
mw.user.options.set( 'flow-editor', name );
}
-
- this.emit( 'change' );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/286524
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I877b09c3d015a40aa01405ab3efc5bd088203d9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits