Skip to content

Commit

Permalink
actiontable.js: Use event.currentTarget instead of the closest tr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nilmerg committed Jan 22, 2018
1 parent d0aa390 commit 7483a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/icinga/behavior/actiontable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7483a16

Please sign in to comment.