mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Take pageCanLoadVE into account when figuring out whether VE will load in-page or not
Bug: T121342 Change-Id: I84ade6e2ab062597fbfd859a90a864c7607547da
This commit is contained in:
parent
648457ca4c
commit
774034b553
|
@ -773,11 +773,13 @@
|
|||
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
||||
userPrefEnabled
|
||||
) {
|
||||
loadVEInPage = mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||
loadVEInPage = pageCanLoadVE && (
|
||||
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||
(
|
||||
getLastEditor() !== 'wikitext' &&
|
||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
||||
);
|
||||
)
|
||||
);
|
||||
// Handle section edit link clicks
|
||||
$( '.mw-editsection a' ).on( 'click', function ( e ) {
|
||||
if ( loadVEInPage ) {
|
||||
|
|
Loading…
Reference in a new issue