Skip to content

Commit

Permalink
fix(details tab buttons): Ensuring all tabs works as expected
Browse files Browse the repository at this point in the history
Fixing incorrect looping logic that caused certain tabs not to have events bound to them.

#3
  • Loading branch information
Portugal, Marcelo authored and Portugal, Marcelo committed Nov 29, 2016
1 parent a973d63 commit b6b5237
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}

// tabs
for(var k = 0; k < lintResults.length; k++) {
for(var k = 0; k < tabs.length; k++) {
tabs[k].addEventListener('click', activateTab);
}

Expand Down
2 changes: 2 additions & 0 deletions lib/templates/details/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<button data-parent=".f-<%= parentIndex %>"
data-content="sourceCode-<%= parentIndex %>"
aria-controls="sourceCode-<%= parentIndex %>"
type="button"
role="tab">
SourceCode
</button>
Expand All @@ -13,6 +14,7 @@
<button data-parent=".f-<%= parentIndex %>"
data-content="detailSummary-<%= parentIndex %>"
aria-controls="detailSummary-<%= parentIndex %>"
type="button"
role="tab">
Summary
</button>
Expand Down

0 comments on commit b6b5237

Please sign in to comment.