From 3ef47ab625785971f9839da5e677c3c641dbeec3 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 13 Apr 2019 14:33:35 +0200 Subject: [PATCH] Fixed specific 'middle click' issue (#36) --- assets/javascripts/issue_dynamic_edit.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/issue_dynamic_edit.js b/assets/javascripts/issue_dynamic_edit.js index aa34589..057836a 100644 --- a/assets/javascripts/issue_dynamic_edit.js +++ b/assets/javascripts/issue_dynamic_edit.js @@ -1,4 +1,7 @@ -/* Allow inclusion from other page */ +/* + * Allow inclusion from other page + * See https://github.com/Ilogeek/redmine_issue_dynamic_edit/commit/26684a2dd9b12dcc7377afd79e9fe5c142d26ebd for more info + */ var LOCATION_HREF = typeof custom_location_href !== 'undefined' ? custom_location_href : window.location.href; /* FontAwesome inclusion */ @@ -17,6 +20,7 @@ var cssId = 'fontAwesome'; $(document).on('click', function(e){ $('.issue .attributes .attribute .value').removeClass('edited'); + if($(e.target).closest('a').length){ return; } if($(e.target).closest('.value').length) { $(e.target).closest('.value').addClass('edited'); }