Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Context menu in mobile is not working

Hello all,

           The recent requirements for a PowerBI custom visual is to have a context-menu to deploy it to the app source. We did implement the context menu as per guide lines and we are able to get the context menu in desktop but we couldn't get the context menu on long-press in mobile. We checked the simple bar chart visual of PowerBI to verify, It does not show context menu on long-press. Is this a PowerBI limitation ?

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous

If you've bound the event using contextmenu, then according to the docs, there isn't a corresponding event for mobile. Their suggestion is to use an external library, which I presume means powerbi-visuals-utils-interactivityutils. This library has a method for handling the context menu, although I've just skimmed the source code and it still binds to that event anyway, so your suspicions may be correct.

Deployment to AppSource with this functionality should be fine. I've submitted an uncertified visual that does this, and have recently had another visual pass certification (if you're going that far) using this approach too. However, if you are concerned about getting stuck somewhere in the process and want to ensure everything's right beforehand, you'll be better contacting  pbicvsupport@microsoft.com for specific advice as they'll be the ones reviewing the visual during the process and have been very helpful to me in the past when I've had similar questions.

Good luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @Anonymous

If you've bound the event using contextmenu, then according to the docs, there isn't a corresponding event for mobile. Their suggestion is to use an external library, which I presume means powerbi-visuals-utils-interactivityutils. This library has a method for handling the context menu, although I've just skimmed the source code and it still binds to that event anyway, so your suspicions may be correct.

Deployment to AppSource with this functionality should be fine. I've submitted an uncertified visual that does this, and have recently had another visual pass certification (if you're going that far) using this approach too. However, if you are concerned about getting stuck somewhere in the process and want to ensure everything's right beforehand, you'll be better contacting  pbicvsupport@microsoft.com for specific advice as they'll be the ones reviewing the visual during the process and have been very helpful to me in the past when I've had similar questions.

Good luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.