Back to Devexpress

My iOS Device Does Not Display the Context Menu

blazor-403291-troubleshooting-navigation-component-related-issues-ios-device-does-not-display-the-context-menu.md

latest1.3 KB
Original Source

My iOS Device Does Not Display the Context Menu

  • Jan 22, 2026
  • 3 minutes to read

The Context Menu component is displayed every time the contextmenu event occurs. However, this event never occurs on iOS devices.

Implement JavaScript functions to handle touch events in your application to display the context menu on iOS devices. To do this, follow the steps below:

  1. Add the DxContextMenu component to a .razor file:

  2. Add a container to display the Context Menu as follows:

  3. Create a folder to store JavaScript source code. To do this, right-click the wwwroot folder in the Visual Studio Solution Explorer, select AddNew Folder , and specify a name for the folder (for example, js ).

  4. Right-click the js folder and select AddNew Item. Choose the JavaScript file template and give it a name (for example, contextmenu.js ).

  5. Copy the following code to the JavaScript file:

  6. Embed the contextmenu.js script into the _Layout.cshtml file:

  7. Add the following code to the .razor file to call JavaScript methods that add event listeners:

  8. Use a long tap to display the Context Menu.