mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Merge "ve.init.mw.DesktopArticleTarget: Fix generated URL when loaded using veaction=edit in single-tab mode"
This commit is contained in:
commit
51b93cea94
|
@ -1226,7 +1226,8 @@ ve.init.mw.DesktopArticleTarget.prototype.transformCategoryLinks = function ( $c
|
||||||
*/
|
*/
|
||||||
ve.init.mw.DesktopArticleTarget.prototype.updateHistoryState = function () {
|
ve.init.mw.DesktopArticleTarget.prototype.updateHistoryState = function () {
|
||||||
var uri,
|
var uri,
|
||||||
veaction = this.getDefaultMode() === 'visual' ? 'edit' : 'editsource';
|
veaction = this.getDefaultMode() === 'visual' ? 'edit' : 'editsource',
|
||||||
|
section = this.section !== null ? this.section : undefined;
|
||||||
|
|
||||||
// Push veaction=edit(source) url in history (if not already. If we got here by a veaction=edit(source)
|
// Push veaction=edit(source) url in history (if not already. If we got here by a veaction=edit(source)
|
||||||
// permalink then it will be there already and the constructor called #activate)
|
// permalink then it will be there already and the constructor called #activate)
|
||||||
|
@ -1235,7 +1236,7 @@ ve.init.mw.DesktopArticleTarget.prototype.updateHistoryState = function () {
|
||||||
history.pushState &&
|
history.pushState &&
|
||||||
(
|
(
|
||||||
this.currentUri.query.veaction !== veaction ||
|
this.currentUri.query.veaction !== veaction ||
|
||||||
this.currentUri.query.section !== this.section
|
this.currentUri.query.section !== section
|
||||||
) &&
|
) &&
|
||||||
this.currentUri.query.action !== 'edit'
|
this.currentUri.query.action !== 'edit'
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue