Permalink
Browse files

Issue 2821: prevented caling blur() on a body element, causes bug in IE8

  • Loading branch information...
pbosakov committed Nov 2, 2011
1 parent 85927d3 commit 8387919d26f7a0c283e556b93f3fb240ef92ba7b
Showing with 7 additions and 1 deletion.
  1. +7 −1 js/jquery.mobile.navigation.js
@@ -1089,7 +1089,13 @@
// Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
// is undefined when we are in an IFrame.
try {
$( document.activeElement || "" ).add( "input:focus, textarea:focus, select:focus" ).blur();
if(document.activeElement) {
if(document.activeElement.nodeName.toLowerCase() != 'body') {
document.activeElement.blur();
}
} else {
$( "input:focus, textarea:focus, select:focus" ).blur();
}
} catch(e) {}
// If we're displaying the page as a dialog, we don't want the url

0 comments on commit 8387919

Please sign in to comment.