Skip to Content
avatar image
Former Member

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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 2 days ago

    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 comment
    10|10000 characters needed characters exceeded

  • 2 days ago

    Hi,

    Have you found the solution for this ?

    Regards

    Binh Trinh

    Add comment
    10|10000 characters needed characters exceeded