Semper Posted April 22, 2013 Share Posted April 22, 2013 Tried to change UniMainModule.BrowserOptions at runtime: if chkBrowserOptions.Checked=True then UniMainModule.BrowserOptions:=[] else UniMainModule.BrowserOptions:=[boDisableMouseRightClick]; but this has no effect. So I have a question - Is it possible to change UniMainModule.BrowserOptions in runtime? Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted July 25, 2014 Share Posted July 25, 2014 Same here. No effect also at designtime. The menu of the browser is shown over my TUniPopupMenu. i studied the pop demo and i am shure that i do all right. But maybe i have overseen something? edit: in Safari, it works, in Firefox it does not work Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted July 25, 2014 Share Posted July 25, 2014 Could that wor? <body oncontextmenu="return false;"> If yes, where i have to inject that? Link to comment Share on other sites More sharing options...
Sherzod Posted July 30, 2014 Share Posted July 30, 2014 Hi! If question still relevant , try: procedure TMainForm.UniButton1Click(Sender: TObject); begin if MainModule.UniMainModule.BrowserOptions = [] then begin MainModule.UniMainModule.BrowserOptions := [boDisableMouseRightClick]; UniSession.AddJS('document.oncontextmenu = document.body.oncontextmenu = function () { return false; }'); end else begin MainModule.UniMainModule.BrowserOptions := []; UniSession.AddJS('document.oncontextmenu = document.body.oncontextmenu = function () { return true; }'); end; end; Best regards. 2 1 Link to comment Share on other sites More sharing options...
Semper Posted July 30, 2014 Author Share Posted July 30, 2014 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now