]> source.dussan.org Git - nextcloud-server.git/commitdiff
Js magic to reset search 3249/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 26 Jan 2017 14:33:05 +0000 (15:33 +0100)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 26 Jan 2017 14:33:05 +0000 (15:33 +0100)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
core/search/js/search.js

index 4dd29ef917f05300a5c79d141fd3a1c1f3ed570d..44a69842374ceb9a4e17fb097c43d7637321981b 100644 (file)
@@ -405,6 +405,10 @@ $(document).ready(function() {
                        OC.Search = new OCA.Search($('#searchbox'), $('#searchresults'));
                });
        }
+       $('#searchbox + .icon-close-white').click(function() {
+               OC.Search.clear();
+               $('#searchbox').focus();
+       });
 });
 
 /**