onBlur issue with searchBar and Repeater

Hi! Thank you in advance!

I have a text input and a repeater linked to a database.
Results are shown when something typed matches a database element.
On every result there’s a button linked to its URL from the database.
If user wants to stop the query he should be able to end the query and make the repeater hide.

Note 1: I don’t want to use the page.onClick() beacuse I would get the annoying clickable cursor all over the page.

Note 2: I would use the searchbar.onBlur() as it’s meant to do that…Right(?)

The onBlur function works if user click on the page background but ALSO when clicking on the repeater button instead of redirecting to the element page.

Any suggestion? (I know it can be done 'cause it worked 2 weeks ago before changes have been made - no restore possibility with the website history.) Thank you again

export function input1_keyPress(event, $w) {
 let SearchValue = $w("#input1").value;
if(SearchValue === "" || event.key === "Escape" || event.key === "Delete")
else $w('#repeater1').show();

Read the onBlur API Reference, whatever you put it on it will create an event handler on it, so if you simply put it on the repeater, then the whole repeater will be an event handler.

If you want to do certain parts of the repeater then simply follow what it tells you on the reference.
…To get a scoped selector for working with elements in repeater items, use the $w.at() function and pass it the context property of the event parameter: $item = $w.at(event.context). To learn more, see here .

I managed to make the repeater hide but if I want to navigate the results when I click on the repeater element the page linked by URL doesn’t open and the repeater disappears.