From 7483a168f98be523aa4ae4ad4b264795c5137ea7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 22 Jan 2018 10:52:55 +0100 Subject: [PATCH] actiontable.js: Use `event.currentTarget` instead of the closest tr This event is triggered due to delegation. If any onclick event is able to bubble up this far that it gets triggered we can safely use whatever it has been triggered for. (i.e. it can only be a tr[href]) refs #3298 --- public/js/icinga/behavior/actiontable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/icinga/behavior/actiontable.js b/public/js/icinga/behavior/actiontable.js index 8f2990d439..5b92d29592 100644 --- a/public/js/icinga/behavior/actiontable.js +++ b/public/js/icinga/behavior/actiontable.js @@ -375,7 +375,7 @@ ActionTable.prototype.onRowClicked = function (event) { var _this = event.data.self; var $target = $(event.target); - var $tr = $target.closest('tr'); + var $tr = $(event.currentTarget); var table = new Selection($tr.closest('table.action, table.table-row-selectable')[0], _this.icinga); // some rows may contain form actions that trigger a different action, pass those through