Skip to Content

UI5 Control Right Click "oncontextmenu" functionality in Fiori Launchpad

Hi Experts,

I am trying to get right click functionality for a button.So, I have extended 'sap.m.Button' control like below.

and done the modification in index.html file like below to disable standard oncontextmenu

functionality:

It is working fine in WebIDE. but when deployed to fiori launchpad it is not working. because index.html file will not run in launchpad.

For this functionality, where should i write the logic ???

capture.png (8.9 kB)
capture1.png (4.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 15, 2019 at 06:34 AM

    Hi,

    I found one solution for it. Hope it can help:

    $('#mySelector').on('contextmenu',function(){returnfalse;});

    Just bind it like you would any other event...

    However, if you're wanting to do this to "protect" content, it's very little security. It's easy to bypass.

    Demo: http://jsfiddle.net/V3sWc/

    Refer: https://stackoverflow.com/questions/13690850/suppressing-a-browsers-default-right-click-menu-refinement

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 15, 2019 at 03:30 AM

    Hi,

    Have you found the solution for this ?

    Regards

    Binh Trinh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.