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"%20target="_blank"%20*ngFor="let%20item%20of%20resultModels"%20class="d-flex%20text-gray-900%20text-hover-primary%20align-items-center%20mb-5" target="_blank" rel="nofollow ugc noopener noreferrer">
<div class="symbol symbol-40px me-4">
<img src="{{ item.image }}" 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.
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.