Can't enable native right click for custom widget

Answered
0
0

Hi team,

When I create a widget, I can’t enable native browser’s right click. I tried to set .EnableNativeContextMenu = true; or .Eval(“this.setNativeContextMenu(true);”);

In wisej JS source code I can see that you call this.setNativeContextMenu(true); in constructor of some components, so I just can’t figure out how to call this function properly, please help, but it doesn’t work in any possible way for me. Example:

[ToolboxBitmap(typeof(MyNewWrapper))]
[Description(“Input is a lightweight, free, and open source terminal for the web.”)]
public class MyNewWrapper: Widget, IWisejControl
{
public MyNewWrapper()
{
this.EnableNativeContextMenu = true; // doesn’t work
this.Eval(“this.setNativeContextMenu(true);”); // doesn’t work
}

…other code…

}

(P.S. if I use the similar code for a panel that uses the widget, it also doesn’t work, like panel.EnableNativeContextMenu = true;)

Regards, Michael

  • M M
    • M M
    • Mar 12, 2020 - 2:31 am
    P.S.2: In widget’s init script, I could find valid nativeContextMenu functions, but it still gives no effect in UI this.init = function (options) { if (wisej.web.DesignMode) return; this.initNativeContextMenu(true); this.setNativeContextMenu(true); this.setRuntimeNativeContextMenu(true); … }
  • You must to post comments
Great Answer
0
0

Hi,

the next Wisej build will include Widget.EnableNativeContextMenu.
This enhancement request is logged as issue #2191

Best regards
Frank

  • You must to post comments
0
0

Hi Frank,

Thanks for update. What WiseJ version will it be at least approximately?

 

Michael

  • You must to post comments
0
0

Hi Michael,

enhancement #2191 is included in Wisej development build 2.1.48.

Best regards
Frank

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.