Skip to content
This repository
Browse code

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...
commit 63052f57b8c90cf00d323edd76a9544971bf1b46 1 parent cfebf11
authored February 29, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  js/jquery.mobile.buttonMarkup.js
6  js/jquery.mobile.buttonMarkup.js
@@ -236,6 +236,12 @@ var attachEvents = function() {
236 236
 				hov && clearTimeout( hov );
237 237
 				foc && clearTimeout( foc );
238 238
 			}
  239
+		},
  240
+		"focusin focus": function( event ){
  241
+			$( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass );
  242
+		},
  243
+		"focusout blur": function( event ){
  244
+			$( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass );
239 245
 		}
240 246
 	});
241 247
 

0 notes on commit 63052f5

Please sign in to comment.
Something went wrong with that request. Please try again.