In firefox can't get keyboard focus back from silverlight object in javascript
I have a silverlight object that keeps grabbing keyboard focus and I can't get the focus back. I have javascript application with a menu where the user can select an option by pressing the "enter" key. "Enter" works until the user clicks on the silverlight object. I tried to create a workaround by using this method:
Epg.prototype.grabClick = function(screen){
// Hack for Mac+Firefox - when you click the screen, we must recover focus from Silverlight
screen开发者_如何转开发.div.click(function(event){
if ($.browser.mozilla) {
window.blur();
window.focus();
}
});
}
This issue does not happen in Chrome only Firefox. Thanks in advance!
I don't think window.focus() works properly in firefox. Can you pick some element inside the window and use it to focus?
精彩评论