]> git.0d.be Git - panikweb.git/commitdiff
js: only focus search input on main search page
authorFrédéric Péters <fpeters@0d.be>
Sat, 27 Jan 2018 17:55:16 +0000 (18:55 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sat, 27 Jan 2018 17:55:16 +0000 (18:55 +0100)
On mobile this will pop the keyboard up and we don't want that to happen
on every pages.

panikweb_templates/static/js/specifics.js

index c987c5d65d55efe2eef0b15408bfa7184b859012..355ed69753163eab0e9f6f0e424c79c86c47fe4d 100644 (file)
@@ -422,8 +422,8 @@ $(function() {
                        return false;
                });
 
-               if ($('input#id_q').val() == '') {
-                       $('input#id_q').focus();
+               if ($('#search-form.big input#id_q').val() == '') {
+                       $('#search-form.big input#id_q').focus();
                }
 
                 $('#ticker li:not(:first)');