Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Fix IE8 putting the dialog behind its parent window.
Browse files Browse the repository at this point in the history
fixes #3423
  • Loading branch information
Shane Tomlinson committed May 17, 2013
1 parent 48db857 commit e5c82b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/static/common/js/lib/dom-jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ BrowserID.DOM = ( function() {
if ( el.is( ':visible' ) && el.is( ':enabled' ) ) {
// IE8 is difficult. Sometimes a new element cannot be
// programatically focused if the old element is not first blurred.
jQuery( ':focus' ).blur();
// IE8 is doubly difficult because the default element that is
// focused is the body. If you blur the body, it puts a dialog
// behind its parent window.
if (! jQuery( ':focus' ).is("body")) {
jQuery( ':focus' ).blur();
}

el.focus();
}
Expand Down

0 comments on commit e5c82b2

Please sign in to comment.