Last Updated: 08 Jul 2021 08:54 by ADMIN
Created on: 23 Jun 2021 12:57
Category: ContextMenu
Type: Bug Report
ContextMenu inside TelerikGrid set focus in the wrong position

Based on the sample app "BlazingCoffee" (where you can reproduce this bug), when I add a ContextMenu in the grid Sales, using OnRowContextMenu of TelerikGrid, there's an asynchrony in the behavior of telerik-blazor.js when it open the popup of the ContextMenu and when it try to focus it.

The bug consists in the fact that when I have a vertically long grid, with an active scrollbar, if I right-click on the first row to open the ContextMenu, the app first try to focus it, does not find it, then scroll the page to the bottom and after all this it open the popup of the ContextMenu in the right position. So you need to scroll back to row where you right-clicked to visualize the ContextMenu. 

In general, it try always to focus to the first element of the ContextMenu and after that it open the new ContextMenu in the right position, letting it focus the page in the wrong position.

To solve this wrong behavior I deleted the last line of code of the method "focusFirstMenuItem" of "telerik-blazor.js". If I remove "t&&t.focus()", the ContextMenu works perfectly, without unwanted scrolling.

I hope you can resolve this soon.


Angelo Marzullo


P.S. Telerik version: 2.24.0

Hristian Stefanov
Posted on: 08 Jul 2021 08:54

Hi Giovanni,

Thank you for noticing the bug and reporting it! As a small gesture of gratitude, I added some Telerik points to your account.

The provided repo helped us a lot. We made further tests on the described behavior and this is an actual bug that occurs only in WASM projects.

I changed the status to "Unplanned". This means the bug has been confirmed, and we are committed to providing a fix, but currently, it is not scheduled for a specific release. By clicking on the Follow button you will get notified via email over status changes. Also, I have added your Vote for it in order to increase the popularity of the item. 

Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Posted on: 01 Jul 2021 10:16

Hi Hristian,

thanks for your feedback; we forked your repo and created an ad-hoc branch in order to reproduce the issue (here is the link)
Once got the branch (issue/1525127), run the app and go to Human Capital page (/blazor-coffee/manage-employees); we have added a context menu on the employees table.

Looking forward to hear from you soon.



Hristian Stefanov
Posted on: 29 Jun 2021 14:57

Hi Angelo,

I tested the scenario by adding a ContextMenu to the Grid in the BlazingCoffee app and didn't reproduce the described behavior. 

Can you please use our BlazingCoffee repository to create a branch with the reproduction? It will allow me to investigate further this problem on my machine.


Thank you.

Hristian Stefanov
Progress Telerik

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/.