mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-23 18:38:18 +00:00
Initialize tab state to avoid flicker
Also set 'defaultMode' before calling parent constructor. Bug: T234403 Change-Id: I08320bd539419ddf7ba22a5dc316177d751bcb8d
This commit is contained in:
parent
16cf49e7e4
commit
ac476eb4cf
|
@ -118,6 +118,9 @@ function ReplyWidget( commentController, parsoidData, config ) {
|
||||||
framed: false
|
framed: false
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Initialize to avoid flicker when switching mode
|
||||||
|
this.modeTabSelect.selectItemByData( this.getMode() );
|
||||||
|
|
||||||
this.modeTabSelect.connect( this, {
|
this.modeTabSelect.connect( this, {
|
||||||
choose: 'onModeTabSelectChoose'
|
choose: 'onModeTabSelectChoose'
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -13,13 +13,13 @@ require( './dt.ui.UsernameCompletion.js' );
|
||||||
* @param {Object} [config] Configuration options
|
* @param {Object} [config] Configuration options
|
||||||
*/
|
*/
|
||||||
function ReplyWidgetVisual() {
|
function ReplyWidgetVisual() {
|
||||||
// Parent constructor
|
|
||||||
ReplyWidgetVisual.super.apply( this, arguments );
|
|
||||||
|
|
||||||
// TODO: Support 2017 wikitext editor
|
// TODO: Support 2017 wikitext editor
|
||||||
this.defaultMode = 'visual';
|
this.defaultMode = 'visual';
|
||||||
this.initialValue = null;
|
this.initialValue = null;
|
||||||
|
|
||||||
|
// Parent constructor
|
||||||
|
ReplyWidgetVisual.super.apply( this, arguments );
|
||||||
|
|
||||||
// TODO: Rename this widget to VE, as it isn't just visual mode
|
// TODO: Rename this widget to VE, as it isn't just visual mode
|
||||||
this.$element.addClass( 'dt-ui-replyWidget-ve' );
|
this.$element.addClass( 'dt-ui-replyWidget-ve' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue