We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0d3280 commit e9dd2deCopy full SHA for e9dd2de
src/plugins/search/component.js
@@ -171,11 +171,20 @@ function bindEvents() {
171
const $inputWrap = Docsify.dom.find($search, '.input-wrap');
172
173
let timeId;
174
- // Prevent to Fold sidebar
+
175
+ /**
176
+ Prevent to Fold sidebar.
177
178
+ When searching on the mobile end,
179
+ the sidebar is collapsed when you click the INPUT box,
180
+ making it impossible to search.
181
+ */
182
Docsify.dom.on(
183
$search,
184
'click',
- e => e.target.tagName !== 'A' && e.stopPropagation()
185
+ e =>
186
+ ['A', 'H2', 'P', 'EM'].indexOf(e.target.tagName) === -1 &&
187
+ e.stopPropagation()
188
);
189
Docsify.dom.on($input, 'input', e => {
190
clearTimeout(timeId);
0 commit comments