fix(search tips): remove them on click

This commit is contained in:
mrilyew 2024-12-13 22:03:58 +03:00
parent 959a6d6ac3
commit ba5e2dba3c
3 changed files with 4 additions and 2 deletions

View file

@ -2856,7 +2856,7 @@ a.poll-retract-vote {
.page_header.search_expanded .header_navigation #search_box #searchBoxFastTips.shown {
display: flex;
flex-direction: column;
z-index: 2;
z-index: 11;
}
.page_header.search_expanded_at_all .header_navigation #search_box #searchBoxFastTips.shown {

View file

@ -138,7 +138,7 @@ u(`#search_box input[type='search']`).on('input', async (e) => {
u('#searchBoxFastTips').html('')
json_result.items.forEach(item => {
u('#searchBoxFastTips').append(`
<a href='${item['url']}'>
<a href='${item['url']}' ${section == 'videos' ? `id='videoOpen' data-id="${item['owner_id']}_${item['id']}"` : ''}>
<img src='${item['preview']}' class='search_tip_preview_block'>
<div class='search_tip_info_block'>
<b>${ovk_proc_strtr(item['name'].escapeHtml(), 50)}</b>

View file

@ -102,6 +102,8 @@ window.router = new class {
} else {
if(u('.page_header').hasClass('search_expanded_at_all')) {
u('.page_header').removeClass('search_expanded_at_all').removeClass('search_expanded')
} else {
u('.page_header').removeClass('search_expanded')
}
}