File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,17 @@ $(document).ready(function () {
119119 } ,
120120 } ) ;
121121
122- $ ( '#violationsTable tbody' ) . on ( 'click' , 'tr[role=row]' , function ( ) {
123- var tr = $ ( this ) . closest ( 'tr' ) ;
122+ $ ( '#violationsTable tbody' ) . on ( 'click' , 'tr' , function ( ) {
123+ // the event handler might be executed on "tr" elements in sub tables, such as
124+ // code snippets or it might be a child-row (a tr, whose previous sibling has class dt-hasChild)
125+ if ( ! this . parentElement . parentElement . id === 'violationsTable' ) {
126+ return ;
127+ }
128+ if ( this . previousElementSibling !== null && this . previousElementSibling . classList . contains ( 'dt-hasChild' ) ) {
129+ return ;
130+ }
131+
132+ var tr = $ ( this ) ;
124133 var row = table . row ( tr ) ;
125134
126135 if ( row . child . isShown ( ) ) {
You can’t perform that action at this time.
0 commit comments