r77643 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77642‎ | r77643 | r77644 >
Date:12:46, 3 December 2010
Author:catrope
Status:ok
Tags:
Comment:
Followup r76973: keep $target variable local
Modified paths:
  • /trunk/phase3/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js
@@ -14,7 +14,7 @@
1515 var href = $(this).find( '.editsection a' ).attr( 'href' );
1616 // Check if target is the anchor link itself. If so, don't suppress the context menu; this
1717 // way the reader can still do things like copy URL, open in new tab etc.
18 - $target = $( e.target );
 18+ var $target = $( e.target );
1919 if ( !$target.is( 'a' ) && !$target.parent().is( '.editsection' ) ){
2020 window.location = href;
2121 e.preventDefault();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76973Cleaned up the code a bit, and added a return false to prevent other bindings...tparscal22:03, 18 November 2010

Status & tagging log