diff --git a/js/widgets/popup.js b/js/widgets/popup.js index fc89a4be1f3..cc9a62b17ee 100644 --- a/js/widgets/popup.js +++ b/js/widgets/popup.js @@ -659,11 +659,16 @@ $.widget( "mobile.popup", $.mobile.widget, { }, _closePrereqsDone: function() { - this._ui.container.removeAttr( "tabindex" ); + var container = this._ui.container; + + container.removeAttr( "tabindex" ); // remove the global mutex for popups $.mobile.popup.active = undefined; + // Blur elements inside the container, including the container + $( ":focus", container[ 0 ] ).add( container[ 0 ] ).blur(); + // alert users that the popup is closed this._trigger( "afterclose" ); },