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.

(cherry picked from commit 4659c97)

Conflicts:
	js/widgets/popup.js
  • Loading branch information...
gabrielschulhof committed May 7, 2013
1 parent 7b1221c commit 143e4ba845eaf555ac78518857804f1e8494ce30
Showing with 5 additions and 2 deletions.
  1. +5 −2 js/widgets/popup.js
View
@@ -656,13 +656,16 @@ $.widget( "mobile.popup", $.mobile.widget, {
},
_closePrereqsDone: function() {
var opts = this.options;
var container = this._ui.container;
this._ui.container.removeAttr( "tabindex" );
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 143e4ba

Please sign in to comment.