diff options
| author | Pixelastic <[email protected]> | 2018-11-22 15:34:34 +0100 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-11-22 17:38:27 +0200 |
| commit | 3e25bf403a9d07dbeef701c340c1de47bb4e58ca (patch) | |
| tree | cfa1712693a10ef4f5899fa67b639f82c9b5d86a /scss/utilities | |
| parent | 8a7ed6047b7613c0226bda8bc09d06f08ab49e45 (diff) | |
| download | bootstrap-3e25bf403a9d07dbeef701c340c1de47bb4e58ca.tar.xz bootstrap-3e25bf403a9d07dbeef701c340c1de47bb4e58ca.zip | |
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 :)
Diffstat (limited to 'scss/utilities')
0 files changed, 0 insertions, 0 deletions
