mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Open sidebar when opening search
This commit is contained in:
@@ -37,11 +37,11 @@ define([
|
||||
var toggleSearch = function(_state) {
|
||||
if (state != null && isSearchOpen() == _state) return;
|
||||
|
||||
|
||||
state.$book.toggleClass("with-search", _state);
|
||||
|
||||
// If search bar is open: focus input
|
||||
if (isSearchOpen()) {
|
||||
sidebar.toggle(true);
|
||||
$searchInput.focus();
|
||||
} else {
|
||||
$searchInput.blur();
|
||||
|
||||
Reference in New Issue
Block a user