Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Add afteropen trigger to setTimeout with android fix
Browse files Browse the repository at this point in the history
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
johnbender committed Aug 31, 2012
1 parent fc9c962 commit 0b87a42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/widgets/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,8 @@ define( [ "jquery",
// the "blue flash" of element focus in android 4.0
setTimeout(function(){
self._ui.container.attr( "tabindex", "0" ).focus();
self._trigger( "afteropen" );
});

self._trigger( "afteropen" );
},

_open: function( options ) {
Expand Down

0 comments on commit 0b87a42

Please sign in to comment.