Update component.js

This commit is contained in:
沈唁
2020-05-14 08:51:50 +08:00
committed by GitHub
parent 62d0986b74
commit f2ff01d91e
+5
View File
@@ -171,6 +171,11 @@ function bindEvents() {
let timeId;
// Prevent to Fold sidebar
Docsify.dom.on(
$search,
'click',
e => e.target.tagName !== 'A' && e.stopPropagation()
);
Docsify.dom.on($input, 'input', e => {
clearTimeout(timeId);
timeId = setTimeout(_ => doSearch(e.target.value.trim()), 100);