mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Fix logic for redirecting unsupported browsers to old editor
Browsers that support JavaScript, but that get served a no-JS
experience by MediaWiki (for example, IE 6), would always get
redirected to an URL with &venoscript=1 - even when it was unnecessary
because we're not in single-tab mode, and even when the form was
previously submitted, causing the loss of user input.
Follow-up to 188ec0f5d2
.
Bug: T163226
Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909
This commit is contained in:
parent
6654de8f0b
commit
21bd2a5b18
|
@ -173,14 +173,14 @@ class VisualEditorHooks {
|
|||
$titleMsg = $title->exists() ? 'editing' : 'creating';
|
||||
$out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) );
|
||||
$out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( $url ) );
|
||||
$out->addScript( Html::inlineScript(
|
||||
"(window.NORLQ=window.NORLQ||[]).push(" .
|
||||
"function(){" .
|
||||
"location.href=\"$url\";" .
|
||||
"}" .
|
||||
");"
|
||||
) );
|
||||
}
|
||||
$out->addScript( Html::inlineScript(
|
||||
"(window.NORLQ=window.NORLQ||[]).push(" .
|
||||
"function(){" .
|
||||
"location.href=\"$url\";" .
|
||||
"}" .
|
||||
");"
|
||||
) );
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue