Hi
I have an TelerikMenu with a mix of internal and external links. The menu is using Data binding to a list of menu items. When using the mouse and clicking the external links it works as expected.
However when using the tab to set focus into the menu, then using the arrow keys to navigate to a menu item then hit Enter key, the link opens in the current tab, even if it set to target="_blank".
In this REPL the Enter key does nothing when at Telerik/Documentation and hitting Enter:
https://blazorrepl.telerik.com/mgYflMuM27MjqZrD54
In my case, the URL is opened in the current tab, instead of a new tab.
I'm using ItemTemplade to render the links and my template for external links looks like this:
if (item.IsExternal) { <ahref="@item.Url"class="@cssClass"target="_blank"rel="noopener noreferrer" @onclick="() => { if (isMobile) CloseMobileMenu(); }" @onclick:stopPropagation="!isMobile"> @item.Text <TelerikSvgIconIcon="@SvgIcon.HyperlinkOpen"Size="@ThemeConstants.SvgIcon.Size.Small"Class="@(isMobile ? "ms-2" : "ms-2")"/></a> }
The rendered HTML looks like this:
<li data-id="595df6d2-0580-42fd-999d-37f73afedcb6" tabindex="-1" class="k-item k-menu-item " role="menuitem" aria-live="polite"><span class="k-link k-menu-link "><div class="d-flex align-items-center justify-content-between w-100 px-2"><a href="https://theurl.com/an/l/45" class="k-menu-link-text" target="_blank" rel="noopener noreferrer">Go to external page<!--!-->
<!--!--><span class="telerik-blazor ms-2 k-icon-sm k-icon k-svg-icon k-svg-i-hyperlink-open" aria-hidden="true"><svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!--><path d="M32 480h448V256h-32v192H64V64h192V32H32zM320 32l56.9 56.9.5.5L224 242.7l45.3 45.3 153.3-153.4L480 192V32z"></path></svg></span></a></div></span></li>I'd rather nog involve js-hacks to solve this issue. Is this a known bug or am i doing it wrong?