Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349283 )

Change subject: WikitextEditorWidget: Update toolbar state when switching back
......................................................................

WikitextEditorWidget: Update toolbar state when switching back

This prevents the mode switcher from having both the "Source mode"
and "Switch to visual mode" tools active. Otherwise there is nothing
that refreshes the tools' active states.

What's also confusing here is that the wikitext and visual editors
each have their own toolbars with their own mode switcher tools,
so the tool that initiates the switch to source mode is not the
one that's visible after the switch.

We should replace this with VE's support for wikitext surfaces
at some point.

Change-Id: I3ed368f0a0a01cd3bd9ee4bc232858583e1a981b
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/83/349283/1

diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
index 84b1427..00e4e48 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
@@ -182,6 +182,7 @@
        mw.flow.ui.WikitextEditorWidget.prototype.afterAttach = function () {
                if ( this.toolbar ) {
                        this.toolbar.initialize();
+                       this.toolbar.emit( 'updateState' );
                }
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349283
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ed368f0a0a01cd3bd9ee4bc232858583e1a981b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to