ractivejs / ractivejs.github.io

https://ractive.js.org
8 stars 33 forks source link

Search result not opening if result is on the current page #146

Closed marcalexiei closed 6 years ago

marcalexiei commented 6 years ago
  1. Open https://ractive.js.org/api/
  2. Open the search
  3. Search for an item present inside the page (e.g. observe)
  4. Click on result that are in the current page (e.g. observe or active.observe)

Search panel is not closing (hash change but not page url).

evs-chris commented 6 years ago

Interesting. If the url is the same (hash change only), the panel just doesn't close. For links to other pages, everything is fine. Should be reasonably easy to $.click that somewhere...

marcalexiei commented 6 years ago

The problem seems caused by a JS error:

TypeError: jQuery('#mkdocs_search_modal').modal is not a function. (In 'jQuery('#mkdocs_search_modal').modal('hide')', 'jQuery('#mkdocs_search_modal').modal' is undefined)

which it seems to be related to mkdocs's search plugin which use .modal that it a bootstrap related API