Permalink
Browse files

activeElement conditional for windows support Fixes #1294

  • Loading branch information...
1 parent 2803947 commit 5c37beaa2964664984a868da918431d3fc55bc30 @johnbender johnbender committed Apr 2, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/jquery.mobile.navigation.js
@@ -363,7 +363,9 @@
if(base){ base.reset(); }
//kill the keyboard
- $( window.document.activeElement ).add( "input:focus, textarea:focus, select:focus" ).blur();
+ if( window.document.activeElement ){
+ $( window.document.activeElement || "" ).add( "input:focus, textarea:focus, select:focus" ).blur();
+ }
function defaultTransition(){
if(transition === undefined){

4 comments on commit 5c37bea

@scottjehl
Contributor

Nice one :) That was it huh?

@scottjehl
Contributor

John: does this need the if? It seems like we still want the .add() part to apply in IE, right?
Would the $( window.document.activeElement || "" ) or something similar cover it on its own?

@johnbender
Contributor

Fixed. I tried the one liner because you posted it in the original issue but I recall it not working well. In any case it did this time. Thanks!

@johnbender
Contributor

And that was the reason for the duplication, I simply failed to remove the original attempt :(

Please sign in to comment.