From 55f40b1fc364f017e21ddded43e48937aa87a275 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 13 Oct 2006 07:12:56 +0000 Subject: [PATCH] (bug 2241) Hide watch tab on edit in favor of checkbox to avoid confusing behavior and accesskey conflict --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d35be10363..e919bcd98d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -44,6 +44,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6868) Un-hardcode section edit link style * (bug 3205) Stop right floats from stacking horizontally in non-Monobook skins * (bug 2013) Inherit ratios and not computed values for line-height +* (bug 2241) Hide watch tab on edit in favor of checkbox to avoid confusing + behavior and accesskey conflict == Languages updated == diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9a948215b3..05ed65d40d 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -719,7 +719,12 @@ class SkinTemplate extends Skin { } wfProfileOut( "$fname-live" ); - if( $this->loggedin ) { + /* If the user edits the article, then loads "watch this article" in background, and then + saves the article with "Watch this article" checkbox disabled, the article is transparently + unwatched. Therefore we do not show the "Watch this page" link in edit mode. Also avoids + accesskey conflict. */ + + if( $this->loggedin && $action != 'edit' && $action != 'submit' ) { if( !$this->mTitle->userIsWatching()) { $content_actions['watch'] = array( 'class' => ($action == 'watch' or $action == 'unwatch') ? 'selected' : false, -- 2.20.1