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.

(cherry picked from commit 4659c97)

Conflicts:
	js/widgets/popup.js
  • Loading branch information
Gabriel Schulhof committed May 7, 2013
1 parent 7b1221c commit 143e4ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/widgets/popup.js
Expand Up @@ -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" );
},
Expand Down

0 comments on commit 143e4ba

Please sign in to comment.