Rank: Newbie Groups: Member
Joined: 12/22/2016 Posts: 2
|
Hello EO Support,
We are seeing some issues with the default Javascript dialog handling behavior (alert/confirm/prompt) where the dialog is not always visible to the users of our application, especially if they don't have the triggering WebView in focus at the time.
We have been looking at your documentation about customization of the dialog handling event (https://www.essentialobjects.com/doc/webbrowser/customize/js_dialog.aspx) and are wondering about the class "JSPrompt" that is referenced in the sample code - is this an EO class and if so, how can we use it in our custom handler?
It seems that the default implementations may not correctly anchor the MessageBox to the application window - we have noticed very strange behavior if the message box appears and then the EO control is disposed, which would suggest that the Window handle provided to MessageBox is somehow related to the EO control itself and not the main application window.
Have you seen this behavior and do you have any suggestions on how best to handle this? I can submit a test project with some details if it would be helpful to you.
Best, Peter
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can ignore the JSPrompt class and just use MessageBox. That way you can anchor it to whatever control/handle you want it to anchor. We do not explicitly pass a window handle to MessageBox ---- you can do so if you want to.
If you are curious about JSPrompt, you can find the full source code in the TabbedBrowser sample project. It's a WPF Window with a text and two buttons.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 12/22/2016 Posts: 2
|
Thanks much for the quick reply, we'll check this out and report back if we continue to encounter issues.
Best, Peter
|