Semper Posted April 22, 2013 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? Quote
Jean-Marc Kiener Posted July 25, 2014 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 Quote
Jean-Marc Kiener Posted July 25, 2014 Posted July 25, 2014 Could that wor? <body oncontextmenu="return false;"> If yes, where i have to inject that? Quote
Sherzod Posted July 30, 2014 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.