Default browser's context menu on mouse context click ie on rightclick

  1. 3 months ago

    Hi guys,

    I needed default browsers's mouse context menu to appear in my web app, (so my non tech savy users may use copy paste commands :)) so I tried a few things and ended up with a a simple hackish solution :)

    just put this line in your open event (or wherever you feel it is needed):

    me.ExecuteJavaScript("document.body.removeEventListener('contextmenu',Xojo.input.contextClick);")

    It will certainly remove all context clicks event from your app, but right clicking your links will bring up standard browser menu where users may open links in new windows so that works for me. I didn't really try to return the event - since I dont need it.

    Mouse button details, in for example mouseup event, can still be used without problems.

  2. Tobias B

    Sep 23 Pre-Release Testers, Xojo Pro Bern, Switzerland

    @Vitomir S I needed default browsers's mouse context menu to appear in my web app

    This request is tracked as Feedback Case #23071

    @Vitomir S ended up with a a simple hackish solution :)

    thanks, I'll put a link to this in the ticket

  3. Jean-Yves P

    Sep 23 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    LOL the feedback is from 2012 !

or Sign Up to reply!