Skip to content

Commit

Permalink
Merge pull request #31 from maisano/patch-1
Browse files Browse the repository at this point in the history
Check if modalElement exists in handleFocus.
  • Loading branch information
mzabriskie committed May 8, 2015
2 parents 494d7d2 + e898b6b commit 1a51bf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/helpers/focusManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ function handleBlur(event) {
function handleFocus(event) {
if (needToFocus) {
needToFocus = false;
if (!modalElement) {
return;
}
// need to see how jQuery shims document.on('focusin') so we don't need the
// setTimeout, firefox doesn't support focusin, if it did, we could focus
// the the element outisde of a setTimeout. Side-effect of this
Expand Down

0 comments on commit 1a51bf8

Please sign in to comment.