TTMSFMXWebBrowserPopup - OnBeforeNavigate

I'm trying to have an html element (a href=...) navigate to a non existent url, and in the onbeforenavigate event set the Params.Cancel := False, thereby stopping the navigation.


So the user taps on the link displayed in the WebBrowser component of the TTMSFMXWebBrowserPopup, and the navigation process begins, but OnBeforeNavigate does not get fired and I receive the appropriate navigation error.

Is that event only meant to fire when the Navigate method is called? Or should it work when a link is selected in html?

Also, is there a trick to setting the size and position of the webbrowserpopup? So far it seems to be resisting my efforts at positioning and sizing.

Thanks.


Hi, 


The OnBeforeNavigate should also fire when a redirect occurs, can you provide a sample that is able to reproduce this issue so we can investigate here what exactly is going wrong?

Meant to say, '...set the Params.Cancel := True...'. Figured this one out, still struggling with positioning. 

Hi, 


this code works as expected, placing the dialog at position 100, 100, with a width of 300 and a Height of 300:

  TMSFMXWebBrowserPopup1.Left := 100;
  TMSFMXWebBrowserPopup1.Top := 100;
  TMSFMXWebBrowserPopup1.Width := 300;
  TMSFMXWebBrowserPopup1.Height := 300;
  TMSFMXWebBrowserPopup1.Open('http://www.tmssoftware.com');