diff --git a/docs/_static/custom.js b/docs/_static/custom.js index 573b21e6fd..dd58574656 100644 --- a/docs/_static/custom.js +++ b/docs/_static/custom.js @@ -1,10 +1,17 @@ -window.addEventListener("DOMContentLoaded", function() { - // Select all elements with class "external" - var externalLinks = document.querySelectorAll("a.external"); +window.addEventListener("DOMContentLoaded", function () { + // Select all elements with class "external" + var externalLinks = document.querySelectorAll("a.external"); - // Loop through each element with class "external" - externalLinks.forEach(function(link) { - // Set the target attribute to "_blank" - link.setAttribute("target", "_blank"); - }); + // Loop through each element with class "external" + externalLinks.forEach(function (link) { + // Set the target attribute to "_blank" + link.setAttribute("target", "_blank"); + }); + + // Remove the default search dialog if it exists (on CMD + K) + // This collides with Algolia's search dialog + const searchDialog = document.getElementById("pst-search-dialog"); + if (searchDialog) { + searchDialog.remove(); + } });