Permalink
Browse files

[popup] Flatten widget methods: move timeout that triggers focus and …

…"popupafteropen" to the widget level
  • Loading branch information...
gabrielschulhof committed Oct 3, 2012
1 parent ff74d34 commit b97dec43ac6aa534b33a3543976bd57a77840378
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/widgets/popup.js
View
@@ -499,6 +499,11 @@ define( [ "jquery",
return { x: x, y: y };
},
_completeOpen: function() {
this._ui.container.attr( "tabindex", "0" ).focus();
this._trigger( "afteropen" );
},
_openPrereqsComplete: function() {
var self = this;
@@ -509,10 +514,7 @@ define( [ "jquery",
// Android appears to trigger the animation complete before the popup
// is visible. Allowing the stack to unwind before applying focus prevents
// the "blue flash" of element focus in android 4.0
setTimeout(function(){
self._ui.container.attr( "tabindex", "0" ).focus();
self._trigger( "afteropen" );
});
setTimeout( $.proxy( this, "_completeOpen" ) );
},
_open: function( options ) {

0 comments on commit b97dec4

Please sign in to comment.