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

Commit 143e4ba

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.
(cherry picked from commit 4659c97) Conflicts: js/widgets/popup.js
1 parent 7b1221c commit 143e4ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/widgets/popup.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,16 @@ $.widget( "mobile.popup", $.mobile.widget, {
656656
},
657657

658658
_closePrereqsDone: function() {
659-
var opts = this.options;
659+
var container = this._ui.container;
660660

661-
this._ui.container.removeAttr( "tabindex" );
661+
container.removeAttr( "tabindex" );
662662

663663
// remove the global mutex for popups
664664
$.mobile.popup.active = undefined;
665665

666+
// Blur elements inside the container, including the container
667+
$( ":focus", container[ 0 ] ).add( container[ 0 ] ).blur();
668+
666669
// alert users that the popup is closed
667670
this._trigger( "afterclose" );
668671
},

0 commit comments

Comments
 (0)