mirror of
https://github.com/twbs/bootstrap.git
synced 2025-11-09 00:12:36 -05:00
search.js: check for search-input element early (#32100)
This commit is contained in:
parent
e347441f88
commit
1d86fcee7b
@ -5,11 +5,12 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
if (!window.docsearch) {
|
var inputElement = document.getElementById('search-input')
|
||||||
|
|
||||||
|
if (!window.docsearch || !inputElement) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var inputElement = document.getElementById('search-input')
|
|
||||||
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
||||||
|
|
||||||
document.addEventListener('keydown', function (event) {
|
document.addEventListener('keydown', function (event) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user