Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Search results component does not open links with target="_blank" in Angular


Hello,

When we add an anchor element with the attribute target="_blank" inside the app-search-results-inner component, clicking the link does not work:


<div data-kt-search-element="results" [ngClass]="searching || keyword.length === 0 ? "d-none" : """>
<div class="scroll-y mh-200px mh-lg-325px">
<h3 class="fs-5 text-muted m-0 pb-5" data-kt-search-element="category-title">
Users

<a href="hwww.google.com%22%20target=%22_blank%22%20*ngFor=%22let%20item%20of%20resultModels%22%20class=%22d-flex%20text-gray-900%20text-hover-primary%20align-items-center%20mb-5" target="_blank">
<div class="symbol symbol-40px me-4">
<img src="%7B%7B%20item.image%20%7D%7D%22%20alt=%22" class="w-100" alt="">
</div>
<div class="d-flex flex-column justify-content-start fw-bold">
<span class="fs-6 fw-bold">{{ item.title }}</span>
<span class="fs-7 fw-bold text-muted">{{ item.description }}</span>
</div>
</a>
</div>
</div>


After some investigation, we have found that the MenuComponent prevents from doing it in line 749.


Text formatting options
Submit

Replies (1)


Hi Aristeidis Bampakos

Thank you for letting us know. We will check the issue and work on a fix. In the meantime, you can try removing e.preventDefault() to see if it resolves the problem. Please let us know if you encounter any other issues.


Text formatting options
Submit
Text formatting options
Submit