Skip to content
This repository
Browse code

Add afteropen trigger to setTimeout with android fix

The select menu's (now that they depend on popup) require that the first item
is focused after they are open. The focus of the popup itself was deferred
until after the trigger of afteropen which the select menu uses to focus its
first item. As a result the focus was stolen from the select menu by the popup
to the popup container.
  • Loading branch information...
commit 0b87a42671110e711725553ef0ad0fce972c3223 1 parent fc9c962
John Bender authored August 31, 2012

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. 3  js/widgets/popup.js
3  js/widgets/popup.js
@@ -488,9 +488,8 @@ define( [ "jquery",
488 488
 			// the "blue flash" of element focus in android 4.0
489 489
 			setTimeout(function(){
490 490
 				self._ui.container.attr( "tabindex", "0" ).focus();
  491
+				self._trigger( "afteropen" );
491 492
 			});
492  
-
493  
-			self._trigger( "afteropen" );
494 493
 		},
495 494
 
496 495
 		_open: function( options ) {

0 notes on commit 0b87a42

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