Skip to content

Commit

Permalink
Readd pre DOM check
Browse files Browse the repository at this point in the history
* Guess this is needed.

Applies to OpenUserJS#904 and OpenUserJS#1062
  • Loading branch information
Martii committed Apr 5, 2017
1 parent 94bc803 commit 850e590
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions views/includes/scripts/tableTrLinkScript.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
var anchor = null;
var url = null;

// Traverse up the DOM to find the container tr tag
switch (container.nodeName) {
case 'A':
// fallthrough
case 'INPUT':
return;
}

// Traverse up the DOM to find the container tr tag or a tag
while (!container.classList.contains('tr-link')) {
if (!(container = container.parentNode)) {
if (!(container = container.parentNode) || container.nodeName === 'A') {
return;
}
}
Expand Down

0 comments on commit 850e590

Please sign in to comment.