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

Commit

Permalink
Popup: Blur any focused elements inside container, including the cont…
Browse files Browse the repository at this point in the history
…ainer itself, upon closing. Fixes #5974 - keyboard does not disappear when after the pop-up is closed.
  • Loading branch information
Gabriel Schulhof committed May 7, 2013
1 parent 273624b commit 4659c97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/widgets/popup.js
Expand Up @@ -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" );
},
Expand Down

0 comments on commit 4659c97

Please sign in to comment.