Ok. It seems Kagi loads different JS files based on the context you load the page. If you load kagi.com you'll get
k_lan.min.js. In this context search is submitted by navigating to /search with the search string.
When you load /search (either by the main page, or by browser address bar) you'll load k_sea.min.js. This seems to load results from a websocket by sending events to the page.
If you click the button to switch to a lens, you instead get k_len.min.js.
(I'm interpreting the naming here as kagi_landing, kagi_search, kagi_lense)
Firstly, the browser reports a content-security violation Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). k_len.min.js:1580
(The resulting report request was blocked by ublock, so perhaps you didn't get notified of this before. I disabled ublock and reloaded the page a few times just in case 😉)
After that no console errors occur
But I noticed that k_len.min.js does not have an event listener for the "provider:search" event. (And the html from the socket does not seem to either) It seems to respond to other events, for example 'provider:top_search' will update, even showing me a correction for misspellings.
Here are the event listeners for provider:search
window.addEventListener('provider:search', (() =>{
const instantTab = document.querySelector('.instant-tab');
instantTab && (instantTab.hidden = !0)
})),
[
'provider:search',
'provider:lenses',
'provider:news',
'provider:videos',
'provider:images'
].forEach((typ=>{
window.addEventListener(typ, (() =>{
metric.timeAction('setup_highlight', setupResults)
}))
})),
And so nothing happens, the content of the page gets cleared.
I can reproduce this 100% consistently, either navigating directly to a search with &l=4 in the uri (any lens will work) or by toggling the button after a normal search. A second search will do nothing, and a third search will clear the results.
Also reproduced on chromium with no extensions