Use current preference each time we open a new reply widget

TODO: Switch already setup widgets when we re-open them.

Bug: T253888
Change-Id: I6c541f27edbfe373f62b8508381bb5182681bda4
This commit is contained in:
Ed Sanders 2020-05-28 21:12:38 +01:00
parent cd216ec538
commit 03a94badfe

View file

@ -128,7 +128,8 @@ CommentController.prototype.setup = function ( mode ) {
commentController = this;
if ( mode === undefined ) {
mode = defaultVisual ? 'visual' : 'source';
mode = ( enableVisual && mw.user.options.get( 'discussiontools-editmode' ) ) ||
( defaultVisual ? 'visual' : 'source' );
}
// TODO: Allow users to use multiple reply widgets simultaneously.