« German FileMaker Conf… | Home | MBS Xojo / Real Studi… »

Bug of the day: onbeforeunload crash


Today I spend a couple of hours tracking down a bug with FileMaker and webviewer.

So if you load a webpage in a webviewer and this website installs window.onbeforeunload event and you close the FileMaker window or switch to layout mode, FileMaker crashes.
Normally the onbeforeunload event is used to warn user that closing window will loose form data. This is normally very useful, but FileMaker doesn't wait for the dialog to complete. Instead it crashes.
To solve this problem I found after a few hours that you only need to clear the onbeforeunload event like this:

MBS( "WebView.RunJavaScript" ; "HTMLEditor"; "window.onbeforeunload = null;")

So the solution for client we simply call this whenever we do something with webview and especially before we switch layout.
13 04 15 - 23:17
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.