Permalink
Browse files

Popup: Blur any focused elements inside container, including the cont…

…ainer itself, upon closing. Fixes #5974 - keyboard does not disappear when after the pop-up is closed.
  • Loading branch information...
gabrielschulhof committed May 7, 2013
1 parent 273624b commit 4659c97e427892030953d8b583e46fd48d5d989f
Showing with 6 additions and 1 deletion.
  1. +6 −1 js/widgets/popup.js
View
@@ -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" );
},

0 comments on commit 4659c97

Please sign in to comment.