Permalink
Browse files

simplify nested branches

  • Loading branch information...
1 parent 1f20d7c commit 46f6c678eb50d4b5c31ceef484b41c9bf2b88809 @johnbender johnbender committed Nov 11, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 js/jquery.mobile.navigation.js
@@ -1099,10 +1099,8 @@
// Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
// is undefined when we are in an IFrame.
try {
- if(document.activeElement) {
- if(document.activeElement.nodeName.toLowerCase() != 'body') {
- document.activeElement.blur();
- }
+ if(document.activeElement && document.activeElement.nodeName.toLowerCase() != 'body') {
+ $(document.activeElement).blur();
} else {
$( "input:focus, textarea:focus, select:focus" ).blur();
}

0 comments on commit 46f6c67

Please sign in to comment.