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

Commit 4659c97

Browse files
author
Gabriel Schulhof
committed
Popup: Blur any focused elements inside container, including the container itself, upon closing. Fixes #5974 - keyboard does not disappear when after the pop-up is closed.
1 parent 273624b commit 4659c97

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/widgets/popup.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,16 @@ $.widget( "mobile.popup", $.mobile.widget, {
659659
},
660660

661661
_closePrereqsDone: function() {
662-
this._ui.container.removeAttr( "tabindex" );
662+
var container = this._ui.container;
663+
664+
container.removeAttr( "tabindex" );
663665

664666
// remove the global mutex for popups
665667
$.mobile.popup.active = undefined;
666668

669+
// Blur elements inside the container, including the container
670+
$( ":focus", container[ 0 ] ).add( container[ 0 ] ).blur();
671+
667672
// alert users that the popup is closed
668673
this._trigger( "afterclose" );
669674
},

0 commit comments

Comments
 (0)