From f932906c0dd6f75902ba20bd21d49f88e81aad63 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 22 Aug 2012 22:38:04 -0700 Subject: [PATCH] Don't jump when I open a link on background Summary: When I open anchor on background then I don't want to jump on foreground. NOTE: I am one problem away from deleting this altogether. Test Plan: Ctrl clicked on lint error. Reviewers: alanh Reviewed By: alanh CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D3369 --- .../rsrc/js/application/differential/behavior-toggle-files.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webroot/rsrc/js/application/differential/behavior-toggle-files.js b/webroot/rsrc/js/application/differential/behavior-toggle-files.js index 60f7e50274..e81c77a8d2 100644 --- a/webroot/rsrc/js/application/differential/behavior-toggle-files.js +++ b/webroot/rsrc/js/application/differential/behavior-toggle-files.js @@ -62,6 +62,10 @@ JX.behavior('differential-toggle-files', function(config) { if (!id || !id.match(/^#.+/)) { return; } + var raw = e.getRawEvent(); + if (raw.altKey || raw.ctrlKey || raw.metaKey || raw.shiftKey) { + return; + } // The target may have either a matching name or a matching id. var target; try {