summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/keyboard.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-06 16:17:54 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-06 16:17:54 -0700
commitf24b66f2c4e1e385168017a2ec06cb262a384cf1 (patch)
treecf4f44d5a9ea68a9ab0cb351291a531fa57986dd /theme/javascript/core/keyboard.js
parent607b45f17261db2b66bbe797c2ef32c00755f624 (diff)
downloadgitbook-f24b66f2c4e1e385168017a2ec06cb262a384cf1.zip
gitbook-f24b66f2c4e1e385168017a2ec06cb262a384cf1.tar.gz
gitbook-f24b66f2c4e1e385168017a2ec06cb262a384cf1.tar.bz2
Blur search input when hidding search bar
Diffstat (limited to 'theme/javascript/core/keyboard.js')
-rw-r--r--theme/javascript/core/keyboard.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/theme/javascript/core/keyboard.js b/theme/javascript/core/keyboard.js
index 53ca1a5..5bbdcf2 100644
--- a/theme/javascript/core/keyboard.js
+++ b/theme/javascript/core/keyboard.js
@@ -2,8 +2,9 @@ define([
"jQuery",
"Mousetrap",
"core/navigation",
- "core/sidebar"
-], function($, Mousetrap, navigation, sidebar){
+ "core/sidebar",
+ "core/search"
+], function($, Mousetrap, navigation, sidebar, search){
// Bind keyboard shortcuts
var init = function() {
// Next
@@ -26,12 +27,13 @@ define([
// Toggle Search
Mousetrap.bind(['f'], function(e) {
- sidebar.toggleSearch();
+ search.toggle();
return false;
});
};
return {
- init: init
+ init: init,
+ search: search
};
}); \ No newline at end of file