diff --git a/app/static/js/items.js b/app/static/js/items.js index 7a5c373902237433aefe98ca4f3f239291a3ea8a..72a71bc46d2adda264beb069738c04e504d6320c 100644 --- a/app/static/js/items.js +++ b/app/static/js/items.js @@ -1,5 +1,11 @@ $(document).ready(function() { + // scroll up to avoid having the form input + // hidden under the navbar + if (location.hash == "#text") { + scrollBy(0, -100); + } + var converter = new showdown.Converter({ simplifiedAutoLink: true }); diff --git a/app/templates/inventory/view_item.html b/app/templates/inventory/view_item.html index 865d8d6a7d6aa570eb5207abd17d32f9d5090b47..0eb5e18b73aaa042f948bccfe54c9d35f0465830 100644 --- a/app/templates/inventory/view_item.html +++ b/app/templates/inventory/view_item.html @@ -62,7 +62,7 @@ <div class="card-body item-comment">{{ comment.text }}</div> </div> {% endfor %} - <a class="btn btn-primary" href="{{ url_for('inventory.comment_item', ics_id=item.ics_id) }}">Comment</a> + <a class="btn btn-primary" href="{{ url_for('inventory.comment_item', ics_id=item.ics_id) }}#text">Comment</a> <hr>