Permalink
Browse files

ensure $.mobile.focusClass is actually used on buttons on focus/blur,…

… and in particular, focusin and focusout. This indirectly fixes #3658, making keyboard access clearer when themes have subtle state shifts. @toddparker, please confirm the fix and if I missed something beyond this, can you reopen?
  • Loading branch information...
1 parent cfebf11 commit 63052f57b8c90cf00d323edd76a9544971bf1b46 scottjehl committed Feb 29, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 js/jquery.mobile.buttonMarkup.js
View
6 js/jquery.mobile.buttonMarkup.js
@@ -236,6 +236,12 @@ var attachEvents = function() {
hov && clearTimeout( hov );
foc && clearTimeout( foc );
}
+ },
+ "focusin focus": function( event ){
+ $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass );
+ },
+ "focusout blur": function( event ){
+ $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass );
}
});

0 comments on commit 63052f5

Please sign in to comment.