mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-05-06 20:46:53 +08:00
[build] 4.3.7
This commit is contained in:
@@ -180,7 +180,7 @@ function tpl (opts, defaultValue) {
|
||||
|
||||
var html =
|
||||
"<input type=\"search\" value=\"" + defaultValue + "\" />" +
|
||||
'<div class="results-panel"></div>' +
|
||||
'<div class="results-panel"></div>' +
|
||||
'</div>';
|
||||
var el = Docsify.dom.create('div', html);
|
||||
var aside = Docsify.dom.find('aside');
|
||||
@@ -215,8 +215,11 @@ function bindEvents () {
|
||||
|
||||
var timeId;
|
||||
// Prevent to Fold sidebar
|
||||
Docsify.dom.on($search, 'click',
|
||||
function (e) { return e.target.tagName !== 'A' && e.stopPropagation(); });
|
||||
Docsify.dom.on(
|
||||
$search,
|
||||
'click',
|
||||
function (e) { return e.target.tagName !== 'A' && e.stopPropagation(); }
|
||||
);
|
||||
Docsify.dom.on($input, 'input', function (e) {
|
||||
clearTimeout(timeId);
|
||||
timeId = setTimeout(function (_) { return doSearch(e.target.value.trim()); }, 100);
|
||||
|
||||
Reference in New Issue
Block a user