andyhill Posted November 22, 2021 Share Posted November 22, 2021 Please advise. I need "AfterRender" and MouseDown Button 2 InfoHTMLFrame.ClientEvents.ExtEvents.Clear; s:= 'afterrender=function afterrender(sender, eOpts) '#13#10+ '{'#13#10+ ' sender.getEl().dom.addEventListener(''contextmenu'', function(e) '#13#10+ ' { '#13#10+ ' e.preventDefault(); '#13#10+ ' }), '#13#10+ ' sender.getEl().dom.addEventListener(''mousedown'', function(e) '#13#10+ ' {'#13#10+ ' if (e.button == 2) '#13#10+ ' { '#13#10+ ' e.preventDefault(); '#13#10+ ' ajaxRequest(sender, ''_Right_Click_'', {x: e.offsetX, y: e.offsetY}); '#13#10+ ' } '#13#10+ ' }), '#13#10+ ' ajaxRequest(fMain.InfoHTMLFrame, ''_AfterRender_'', []); '#13#10+ '}'; InfoHTMLFrame.ClientEvents.ExtEvents.Add(s); Quote Link to comment Share on other sites More sharing options...
andyhill Posted November 23, 2021 Author Share Posted November 23, 2021 If I execute ShowMessage() in ajax event "contextmenu" is shown, if no ShowMessage() in ajax event then works as expected. Quote Link to comment Share on other sites More sharing options...
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.