Followup r76973: keep $target variable local
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 3 Dec 2010 12:46:29 +0000 (12:46 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 3 Dec 2010 12:46:29 +0000 (12:46 +0000)
resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js

index 1125417..5a7c777 100644 (file)
@@ -14,7 +14,7 @@ $( function() {
                var href = $(this).find( '.editsection a' ).attr( 'href' );
                // Check if target is the anchor link itself. If so, don't suppress the context menu; this
                // way the reader can still do things like copy URL, open in new tab etc.
-               $target = $( e.target );
+               var $target = $( e.target );
                if ( !$target.is( 'a' ) && !$target.parent().is( '.editsection' ) ){
                        window.location = href;
                        e.preventDefault();