From f2ff01d91e3fa65a9779c5f339f97e737376a83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=94=81?= <52o@qq52o.cn> Date: Thu, 14 May 2020 08:51:50 +0800 Subject: [PATCH] Update component.js --- src/plugins/search/component.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/search/component.js b/src/plugins/search/component.js index a2e4ec17..21add7ef 100644 --- a/src/plugins/search/component.js +++ b/src/plugins/search/component.js @@ -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);