Reproduction - http://somup.com/crVYIDot19
Setup to reproduce:
<telerik:RadContextMenu ID="RadContextMenu1" runat="server">
<Targets>
<telerik:ContextMenuDocumentTarget />
</Targets>
<Items>
<telerik:RadMenuItem Text="item">
<ItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" />
</ItemTemplate>
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
<telerik:RadButton runat="server" ID="RadButton2" Text="Postback" AutoPostBack="true" />
Steps to reproduce:
Hi,
Here is a temporary workaround for the issue:
Place the below JavaScript code on the page, after the ScriptManager (or RadScriptManager):
Telerik.Web.UI.RadContextMenu.prototype._onKeyDown = function (e) {
if (!e.keyCode && !e.rawEvent) return;
var item = this.get_focusedItem();
var keyCode = e.keyCode ? e.keyCode : e.rawEvent.keyCode;
var items = this.get_items();
if ($(e.target).closest(".rmTemplate").length > 0) {
return false;
}
if (keyCode === Sys.UI.Key.esc) {
this._hide();
return false;
}
if (!item) {
switch (keyCode) {
case Sys.UI.Key.up:
var lastItem = items.getItem(items.get_count() - 1);
if (lastItem.get_visible()) {
lastItem.focus(e);
} else {
lastItem.focusPreviousItem(e);
}
break;
case Sys.UI.Key.down:
var firstItem = items.getItem(0);
if (firstItem.get_visible()) {
firstItem.focus(e);
} else {
firstItem.focusNextItem(e);
}
break;
case Sys.UI.Key.enter:
this._hide();
break;
}
return false;
}
return this._keyboardNavigator._onKeyDown(e, item);
}
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.