0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/site
Pixelastic 3e25bf403a Update DocSearch.js to latest version
The latest (2.6.2) docsearch.js version now displays results as standard `<a href>` links, allowing users to `ctrl`-click on them to trigger default browser behavior of opening in a new tab.

To maintain backward compatibility, this behavior has only been enabled to users that didn't define their own `handleSelected` method.

This PR updates your `docsearch()` code to take advantage of the new `<a href>` template, by removing your custom `handleSelected` and moving its behavior to the `transformData` call. Namely, what you wanted to avoid was jumping to the first `<h1>` of the pages, which would prevent users from seeing the header. This PR checks if the suggestion targets the `#content` anchor (meaning it goes to this first `<h1>`) and remove it.

Behavior should be the same, but at least now you can enjoy the `ctrl`-click :)
2018-11-22 17:38:27 +02:00
..
_data Add new toasts component 2018-11-13 08:47:32 +02:00
_includes Placeholders: use our gray colors (#27701) 2018-11-21 20:59:21 +02:00
_layouts docs: fix path to assets. (#27696) 2018-11-21 15:11:31 +02:00
docs Update DocSearch.js to latest version 2018-11-22 17:38:27 +02:00
.eslintrc.json Move docs .eslintrc in site/. 2018-10-15 16:03:16 +03:00
favicon.ico Reorganize docs for easier deploys 2018-07-11 23:30:46 -07:00
index.html Use fancy apostrophe in HTML files. 2018-11-15 15:55:21 +02:00
robots.txt robots.txt: disallow crawling when not in production. (#27559) 2018-11-02 12:41:57 +02:00
sw.js Unregister Service Worker. 2018-10-20 16:00:28 +03:00