Skip to content

Commit

Permalink
homepage autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
zakandrewking committed Aug 2, 2017
1 parent 4aa7391 commit 51dfe92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bigg_models/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h1 class="title">BiGG Models</h1>
<form id="search-form" action="/search" method="get">
<div class="input-group">
<!-- Autofocus here causes a bug in Safari where you
cannot click the search bar -->
cannot click the search bar, so we do it in JS -->
<input id="search" type="text" name="query" class="form-control"
placeholder="">
</input>
Expand Down Expand Up @@ -236,5 +236,10 @@ <h2>Connect to BiGG Models:</h2>
</div><!-- /.modal -->

{% include 'typeahead.html' %}

<!-- Autofocus -->
<script>
$(document).ready(function() { $('#search').focus() })
</script>
</body>
</html>

0 comments on commit 51dfe92

Please sign in to comment.