Windows Safari Freezes When Silverlight Calls a JavaScript window.alert/prompt

I have a Siverlight application, which needs to get something from the web page that hosts it. So I'm using HtmlPage.Window.Invoke("JS_OpenProject") in Silverlight.

Here is the JavaScript code:

function JS_OpenProject() {
    // window.alert also crashes
    window.alert("Here is a window.alert");

    // window.prompt also crashes
    //var result = window.prompt("Please input the id of the project to be opened:", "12345");

    return result;
}

Safari freezes every time when the JavaScript method JS_OpenProject is called. If I remove the window.alert and window.prompt, it's fine.

On Windows, I tested my Silverlight application with JavaScript calling against IE, Chrome and Firefox, everything works fine, but just the Safari.

I have googled a lot, but no luck.

Please advise!

Thanks.

Peter

Answers:

Answer

I had the same problem with FireFox and that seems to have been corrected now. The problem arises when Silverlight is run in windowsless mode.

If you don't need it turn it off, it will run even faster.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.