- This topic has 2 replies, 2 voices, and was last updated 2 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Browser Context Menu surpression on DataGrid
Hi!
I tried out what ist written in https://www.htmlelements.com/blazor/blazor-ui/demos/blazor-grid?id=context-menu
But the default browser context menu showed all the time.
I researched a bit and added @oncontextmenu:preventDefault="true"
. Initially I tried to add it to the <Grid>
but it did not work as only one @oncontextmenu is able to be defined and that is taken up by the reference to ContextMenu
.
Generally context menu surpression works as
<button class="btn btn-primary" @oncontextmenu:preventDefault="true"
@oncontextmenu="args => ContextMenu(null)">
asdf
</button>
surpresses the browser context menu of the button without problems, and as it is no Blazor/razor component it takes 2 instances of the @oncontextmenu entry
I then tried to add a <div>
around the <Grid>
and added the prevention there, but this did not work either.
Then I downloaded the Smart.Blazor.Demos solution, and tried the implementation there. It does not surpress the browser context menu either???
How does browser context menu surpression work for the grid?
Do you have any ideas why this does not work?
KR Oliver
PS: I cannot surpress the context menu for the whole body tag in the index.html as the standard functionality is still needed somewhere.
Hi oliver.aldrian,
We tested this and we confirm that this is a bug. We will add a work item for this and it will be resolved in the next version of the blazor grid.
Thanks for the feedback!
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/
Thanks for the fast reply. Don’t mind me asking, but what is the time horizon for the next version?
KR