Silverlight 5 in WebView (WebKit) on Mac
-
Thursday, March 22, 2012 6:46 AM
In my Mac OS X cocoa application i am hosting Silverlight application using WebView control of WebKit. But after installing Silverlight 5 run-time I am facing a few problems. I worked around most of them, but cannot get the text boxes to accept input. The ristriction seems quite similare to the ones Silverlight put when application is fullscreen, but my Silverlight application is not running in fullscreen.
I want to know the reason why this restriction is applied to Silverlight running in WebView (WebKit), and is there any workround for it.
All Replies
-
Tuesday, March 27, 2012 2:58 AMModerator
Hi AbdulMoeed,
Thanks for your post.
I am trying to involve someone who familiar with this topic to further look at this issue.
Best Regards,
-
Tuesday, March 27, 2012 6:17 PM
WebView isn't a supported browser, but being based on WebKit should work, just like Safari.
I don't think Silverlight detects the browser and disables/block input based on browser.
Have you tried to debug the input to see where the OS is routing it to? Is Silverlight getting the keyboard input?
-
Wednesday, March 28, 2012 7:24 AM
Silverlight is getting keyboard events, as I am able to move between controls using using Tab. Other keys like arrows and enter also work.
Another thing that is mentionable is that the keyboard input works perfectly if I have Silverlight 4 runtime installed. So there something new in Silverlight 5 runtime that is causing the problem.
-
Thursday, March 29, 2012 9:40 AM
I got another finding that we get the same problem if Silverlight application is running in Chrome on Mac OS X. I know that Chrome on Mac OS X is not offically supported by Microsoft, but I am getting the same problem when I host my application in WebKit framework which is suggested in following artical on MSDN;
-
Tuesday, April 03, 2012 3:50 PM
Silverlight plugs into many browsers and works.
Can you reproduce with a simple Cocoa app, Webkit and simple SL app?
-
Monday, April 09, 2012 6:06 PM
Please see if the following looks like your issue.
-
Saturday, April 28, 2012 11:53 AM
I have found a way to avoid the problem. It's very strange, but after setting the User-Agent of webview (Webkit) to same as Safari on Mac, Silverlight 5 works perfectly in WebView (Webkit). Even the issues like being unable to access html from silverlight were solved after seting User-Agent.

