Skip to content

Commit

Permalink
Merge pull request #670 from JulienMelissas/patch-1
Browse files Browse the repository at this point in the history
Add braces around if statement.
  • Loading branch information
obenland committed Dec 31, 2014
2 parents 75c5023 + 67fb1af commit 396dea5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/skip-link-focus-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
var element = document.getElementById( location.hash.substring( 1 ) );

if ( element ) {
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) )
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
element.tabIndex = -1;
}

element.focus();
}
Expand Down

0 comments on commit 396dea5

Please sign in to comment.